Given the root of a binary tree and two integer values p and q that are guaranteed to exist in the tree, return the value of their lowest common ancestor. A node is the lowest common ancestor when it is the deepest node that has both target values in its subtree (where a node can be a descendant of itself).
Input / output
root: TreeNode, p: int, q: int (root is provided in tests as a LeetCode-style level-order array such as [3,5,1,6,2,0,8,null,null,7,4])int — the value of the lowest common ancestorp and q are different values that both exist in the treeCan you solve it with a single DFS that returns the matching node from each subtree and detects the first split point without storing parent pointers?