LeetCode 865 Solution: Smallest Subtree with Deepest Nodes

leetcode_sol

Problem Overview Given the root of a binary tree, we define deepest nodes as the nodes that are at the maximum depth in the tree.Your task is to return the smallest subtree that contains all of these deepest nodes. The answer must be a node that is the lowest common ancestor (LCA) of all deepest … Read more

Categories Uncategorized