Sponsored
Sponsored
Use these hints if you're stuck. Try solving on your own first.
Do a postorder traversal.
Then, if both subtrees contain a deepest leaf, you can mark this node as the answer (so far).
The final node marked will be the correct answer.