AlgoMaster Logo

Lowest Common Ancestor of a Binary Search Tree

tree=[6, 2, 8, 0, 4, 7, 9, null, null, 3, 5],p=2,q=8
0 / 7
algomaster.io
Step:Find the lowest common ancestor of p=2 and q=8