Problem
Given the root of a binary tree, return its maximum depth (number of nodes along the longest path from root to a leaf).
References
Difficulty
🟢 Easy
Companies
Flipkart, Paytm, PhonePe
Notes
Language: Java
Baseline DFS on trees. 1 + max(left, right).
Problem
Given the root of a binary tree, return its maximum depth (number of nodes along the longest path from root to a leaf).
References
Difficulty
🟢 Easy
Companies
Flipkart, Paytm, PhonePe
Notes
Language: Java
Baseline DFS on trees. 1 + max(left, right).