In a BST, the lowest common ancestor of two values p and q (both present) is the first node, walking down from the root, whose value lies between them (inclusive). Implement lca(root, p, q) returning that node's value, iteratively in O(height).
TreeNode and build are provided.