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

Lowest Common Ancestor of Deepest Leaves #376

Closed
rajbir21-droid opened this issue Oct 1, 2021 · 1 comment · Fixed by #803
Closed

Lowest Common Ancestor of Deepest Leaves #376

rajbir21-droid opened this issue Oct 1, 2021 · 1 comment · Fixed by #803
Assignees

Comments

@rajbir21-droid
Copy link
Contributor

Is your feature request related to a problem? Please describe.

Given the root of a binary tree, return the lowest common ancestor of its deepest leaves.

Describe the solution you'd like

Using the pair<> container of STL library in c++, I will keep the track of the node with their respective levels and the node with the deepest level will be the answer.

Describe alternatives you've considered

It can also be done using hashmap but using pair the code becomes more clear and concise.

@tanvideshmukh29
Copy link

Hi! I would love to work on this issue? can you please assign it to me?

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 a pull request may close this issue.

2 participants