Tree Height
Easy · Tree Height
You are given the root of a binary tree, `tree`. Find its height: the number of nodes on the longest downward path from the root to any leaf, counting both the root and the leaf. An empty tree has height 0, and a single-node tree has height 1.…
Solve the problem →