Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

GATE | Gate IT 2008 | Question 12

  • Last Updated : 28 Jun, 2021

Which of the following is TRUE?

(A) The cost of searching an AVL tree is θ (log n) but that of a binary search tree is O(n)
(B) The cost of searching an AVL tree is θ (log n) but that of a complete binary tree is θ (n log n)
(C) The cost of searching a binary search tree is O (log n ) but that of an AVL tree is θ(n)
(D) The cost of searching an AVL tree is θ (n log n) but that of a binary search tree is O(n)


Answer: (A)

Explanation: AVL tree is a balanced tree.
AVL tree’s time complexity of searching = θ(logn)

But a binary search tree, may be skewed tree, so in worst case BST searching time = θ(n)

Quiz of this Question

Attention reader! Don’t stop learning now.  Practice GATE exam well before the actual exam with the subject-wise and overall quizzes available in GATE Test Series Course.

Learn all GATE CS concepts with Free Live Classes on our youtube channel.

My Personal Notes arrow_drop_up
Recommended Articles
Page :