Back to Question

Smallest Subtree with all the Deepest Nodes

Question Explain

Given the root of a binary tree, the depth of each node is the shortest distance to the root. Find the node that is the lowest common ancestor of all the deepest nodes in the tree.

Start Trying This Question Simulation

Click "Start Speaking" and answer the question naturally.