This question can be solved via recursion depth first search. Keep track of the max depth. Traverse left sub tree then traverse right sub tree - increase the depth each level. Link: Maximum Depth of Binary Tree /** * Definition for a binary tree nod...

Markdown supported · ⌘↵ to post
No responses yet.