Problem
Problem page: https://leetcode.com/problems/maximum-depth-of-binary-tree/
Topics: Tree, Depth-first Search
Difficulty: Easy
Similar problems: (E) Balanced Binary Tree, (E) Minimum Depth of Binary Tree
Given a binary tree, find its maximum depth.
The maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf node.
Analysis
Computing the maximum depth of a binary tree. A standard recursive backtracking solution.
Code
1 | class Solution: |
Article link: https://xnerv.wang/en/leetcode-maximum-depth-of-binary-tree/
