Quiz: LCA in BST

Test your understanding

Check Your Understanding

In a BST, if p = 2 and q = 8, and the current node is 6, what should you do?

  1. A.Return 6 as the LCA because p and q are on opposite sides
  2. B.Go right because 8 > 6
  3. C.Go left because 2 < 6
  4. D.Check both subtrees recursively
Start the roadmap to answer the quizzes and solve the challenges