LeetCode 235: Lowest Common Ancestor of a Binary Search Tree
Problem Restatement We are given: The root of a binary search tree Two nodes p and q We need to find their lowest common ancestor. The lowest common ancestor, usually called LCA, is the lowest node in the tree such that both p and q are descendants of that node. A node may be a descendant of itself. LeetCode examples include: Input: root = [6,2,8,0,4,7,9,null,null,3,5] p = 2 q =...