Skip to content

Add 104. Maximum Depth of Binary Tree.md #21

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Add 104. Maximum Depth of Binary Tree.md #21

wants to merge 1 commit into from

Conversation

t0hsumi
Copy link
Owner

@t0hsumi t0hsumi commented Jan 31, 2025

Copy link

@nodchip nodchip left a comment

Choose a reason for hiding this comment

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

良いと思います。

- BFSではqueueを使うか、自分が解いたようにリストを二つ用意するかがあった。
- Noneチェックせずにstackなりqueueにnodeを入れるものがあった。
- https://discord.com/channels/1084280443945353267/1227073733844406343/1236235351140339742
- 再帰に関しては、上から配るタイプもあった.
Copy link

Choose a reason for hiding this comment

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

「上から配る」は私が書きましたが、別に通用する言い方ではないので、そのつもりでお願いします。

あとは、特に問題ないと思います。

nodes_in_depth = nodes_in_next_depth
depth += 1
return depth
```
Copy link

Choose a reason for hiding this comment

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

読みやすいです!

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.

4 participants