...
Question 10112 – GATE 1996
April 26, 2024
UGC NET CS 2013 Dec-paper-2
April 26, 2024
Question 10112 – GATE 1996
April 26, 2024
UGC NET CS 2013 Dec-paper-2
April 26, 2024

GATE 2012

Question 5

The worst case running time to search for an element in a balanced binary search tree with n2n elements is

A
Θ (n log n)
B
Θ (n2n)
C
Θ (n)
D
Θ (log n)
Question 5 Explanation: 
→ Worst case running time to search for an element in a balanced binary search tree of ‘n’ elements is (log n).
→ No of elements = n.2n then search time = (log n.2n)
= (log n + log 2n)
= (log n + n log 2)
= O(n)
Correct Answer: C
Question 5 Explanation: 
→ Worst case running time to search for an element in a balanced binary search tree of ‘n’ elements is (log n).
→ No of elements = n.2n then search time = (log n.2n)
= (log n + log 2n)
= (log n + n log 2)
= O(n)

Leave a Reply

Your email address will not be published. Required fields are marked *