Monday, October 6, 2025
HomeData Modelling & AIData Structures | Balanced Binary Search Trees | Question 2

Data Structures | Balanced Binary Search Trees | Question 2

The worst case running time to search for an element in a balanced in a binary search tree with n2^n elements is 
(A) \\Theta(n log n)
(B) \\Theta (n2^n)
(C) \\Theta (n)
(D) \\Theta (log n)

(A)

A

(B)

B

(C)

C

(D)

D

Answer: (C)
Explanation:

Time taken to search an element is \\Theta (h) where h is the height of Binary Search Tree (BST). The growth of height of a balanced BST is logarithmic in terms of number of nodes. So the worst case time to search an element would be \\Theta (Log(n*2^n)) which is \\Theta (Log(n) + Log(2^n)) Which is \\Theta (Log(n) + n) which can be written as \\Theta (n) .

Quiz of this Question
Please comment below if you find anything wrong in the above post

Feeling lost in the world of random DSA topics, wasting time without progress? It’s time for a change! Join our DSA course, where we’ll guide you on an exciting journey to master DSA efficiently and on schedule.
Ready to dive in? Explore our Free Demo Content and join our DSA course, trusted by over 100,000 neveropen!

RELATED ARTICLES

Most Popular

Dominic
32338 POSTS0 COMMENTS
Milvus
86 POSTS0 COMMENTS
Nango Kala
6707 POSTS0 COMMENTS
Nicole Veronica
11871 POSTS0 COMMENTS
Nokonwaba Nkukhwana
11936 POSTS0 COMMENTS
Shaida Kate Naidoo
6825 POSTS0 COMMENTS
Ted Musemwa
7090 POSTS0 COMMENTS
Thapelo Manthata
6779 POSTS0 COMMENTS
Umr Jansen
6781 POSTS0 COMMENTS