0104 Maximum Depth of Binary Tree
Solved at: 230129
Question
Maximum Depth of Binary Tree - LeetCode
Given the root of a binary tree, return its maximum depth.
A binary tree's maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf node.
Solution
Results
- Runtime 26 ms Beats 73.36%
- Memory 14.7 MB Beats 58.61%
Complexity Analysis
- Time:
- Space:
Takeaways
We can also use BFS to traverse the tree
Backlinks (1)
Comments (0)