← ALL NOTES
Hash Table

1123. Lowest Common Ancestor of Deepest Leaves

Return the lowest common ancestor of all the deepest leaves of a binary tree. That's the root of the smallest subtree containing every maximum-depth leaf — and, in fact, this is the same problem as…

Loading…