Skip to content
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

Diameter of Binary Tree #39

Closed
wants to merge 357 commits into from
Closed

Diameter of Binary Tree #39

wants to merge 357 commits into from

Conversation

rihib
Copy link
Owner

@rihib rihib commented Sep 25, 2024

Diameter of Binary Treeを解きました。レビューをお願い致します。

問題:https://leetcode.com/problems/diameter-of-binary-tree/
言語:Go

すでに解いている方々:
Kitaken0107/GrindEasy#17
NobukiFukui/Grind75-ProgrammingTraining#36

rihib and others added 23 commits September 23, 2024 22:12
…search_tree

Lowest Common Ancestor of a Binary Search Tree
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.

よいと思います。

https://google.github.io/styleguide/go/decisions#pass-values

l, rについては、スコープが3行なので、逆に変数名を長くすると可読性を下げると思い、1文字変数を使用している。
*/
Copy link

Choose a reason for hiding this comment

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

この形の再帰が書けているならば大丈夫ですが、一応つけておきます。
https://discord.com/channels/1084280443945353267/1206101582861697046/1229120056248766627

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

Successfully merging this pull request may close these issues.

3 participants