Medium-Easy Understand Trees & BST Multiple Choice
What is the time complexity of LCA in a BST vs a general binary tree?
Understand — Tests comprehension and ability to explain concepts.
Answer Options
A O(log n) BST, O(n) general
B O(n) BST, O(log n) general
C O(n) both
D O(log n) both
Want to see the correct answer?
Get the answer with a detailed explanation, plus practice 33+ more Trees & BST questions with adaptive quizzes and timed interviews.
See the Answer on Guru Sishya →This question is from the Trees & BST topic (Data Structures).
More Trees & BST Questions
What does inorder traversal of a BST produce?
EasyWhat is the time complexity of search in a balanced BST?
EasyWhat does the right side view of a binary tree (LC 199) return?
EasyWhy does comparing a node only to its direct parent fail when validating a BST?
Medium-EasyIn Lowest Common Ancestor of a Binary Tree (LC 236), when does the algorithm return the current root?
Medium-Easy