We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Given the root of a binary tree, write an algorithm to find its maximum depth.
root
[0, 10^4]
Input: 3 / \ 9 20 / \ 15 7 Output: 3 Explanation: The longest path is root -> 20 -> 7, which has 3 nodes.
Input: 1 \ 2 Output: 2 Explanation: The tree has a maximum depth of 2, since the longest path is root -> 2.
Input: None (Empty tree) Output: 0 Explanation: The tree is empty, so the maximum depth is 0.
Hey @indrakishore ! Kindly assign me this task.
The text was updated successfully, but these errors were encountered:
plz assign this task to me and also add hactoberfest tag........
Sorry, something went wrong.
Rajesh-1234567
No branches or pull requests
Given the
root
of a binary tree, write an algorithm to find its maximum depth.Input:
Output:
Constraints:
[0, 10^4]
.Example 1:
Example 2:
Example 3:
Hey @indrakishore !
Kindly assign me this task.
The text was updated successfully, but these errors were encountered: