Approach hintTry it first, then revealHide
The depth of a node is one more than the larger depth of its two subtrees, with an empty tree at depth 0. A level-by-level BFS that counts levels also works.
The depth of a node is one more than the larger depth of its two subtrees, with an empty tree at depth 0. A level-by-level BFS that counts levels also works.