Question

Consider a Binary Search Tree (BS

  • A of two nodes in a balanced BST with n nodes? 
  • T where every node stores a key and two child pointers. What is the time complexity of finding the Lowest Common Ancestor (LC
A O(n)
B O(log n)
C O(n log n)
D O(1)
E O(n²)
Practice Next

Relevant for Exams:

Hey! Ask a query