Single Choice Easy

QWhat is the time complexity of searching an element in a binary search tree (BST)?

ID: #21490 Time Complexity 205 views
Question Info
#21490Q ID
EasyDifficulty
Time ComplexityTopic

Choose the Best Option

Click any option to instantly check if you're correct.

  • A O(1)
  • B O(log N)
  • C O(N)
  • D O(N^2)
Correct Answer

Explanation

Binary search in a balanced BST has a time complexity of O(log N) where N is the number of elements. This is due to the logarithmic reduction in the search space with each comparison.

No Previous Next Question

Share This Question

Challenge a friend or share with your study group.