Skip to content

102 binary tree level order traversal#26

Open
kitano-kazuki wants to merge 4 commits intomainfrom
102-binary-tree-level-order-traversal
Open

102 binary tree level order traversal#26
kitano-kazuki wants to merge 4 commits intomainfrom
102-binary-tree-level-order-traversal

Conversation

@kitano-kazuki
Copy link
Copy Markdown
Owner

next_frontier = deque([])
values_at_this_level = []
while frontier:
node = frontier.popleft()
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for node in frontier でループを回せば、deque が不要になりそうです。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants