Given a binary tree, find the lowest common ancestor (LCA) of two given nodes. Tree is given as level-order array. p and q are node values.
Example 1
Input: root = [3,5,1,6,2,0,8,null,null,7,4], p = 5, q = 1
Output: 3
Explanation: 5 is in the root's left subtree and 1 is in its right subtree, so the lowest node above both is the root, 3.
Example 2
Input: root = [3,5,1,6,2,0,8,null,null,7,4], p = 5, q = 4
Output: 5
Explanation: 4 is a descendant of 5 (5 → 2 → 4), and a node counts as its own descendant, so the answer is 5.
Example 3
Input: root = [1,2], p = 1, q = 2
Output: 1
Explanation: 2 is the child of 1, so the lowest common ancestor is 1.
Let recursion do the search. Each call returns: `None` if neither `p` nor `q` is in this subtree; the node itself if this node *is* `p` or `q`; otherwise whichever non-null result bubbled up. The first time *both* sides return non-null, the current node is sitting between them — that's the LCA.
Run checks all cases above. Submit evaluates all test cases.