Maximum Depth of an N-ary Tree
Find the maximum depth of an N-ary tree.
Input: root = [1,null,2,null,3,null,4]
Output: 4
Explanation: The tree is essentially a straight line, requiring a traversal that reaches a maximum depth of 4 layers.
Find the maximum depth of an N-ary tree.
Input: root = [1,null,2,null,3,null,4]
Output: 4
Explanation: The tree is essentially a straight line, requiring a traversal that reaches a maximum depth of 4 layers.
More interviews, more skills, more success.
1 answer from the community
Answer any un-answered question from our database to unlock all community answers for 30 days.
2 answers published. Last candidate submission on Oct 10 2026, 5:03am PDT. Interview question asked to Software Engineers interviewing at Appian, Turo, NetSuite and other companies. Original question asked: Maximum Depth of an N-ary Tree. Question last reported by a candidate interviewing at Strava for a Software Engineer interview on Sep 25 2026, 1:26pm PDT.