DSAMediumTreesRecursion
Maximum Depth of a Binary Tree
đ Problem
Given a binary tree, find its maximum depth â the number of nodes along the longest path from the root down to a leaf.
đ§ Approach
Use recursion: the depth of a tree is 1 (for the current node) plus the larger of the depths of its left and right subtrees. The base case is a NULL node, which has a depth of 0.