Which of the following is TRUE ? 

This question was previously asked in
UGC NET Computer Science (Paper 2) 07 Dec 2023 Official Paper
View all UGC NET Papers >
  1. The cost of searching an AVL tree is θ (log n) but that of binary search is 0(n) 
  2. The cost of searching an AVL tree in θ (log n) but that of complete binary tree is θ (n log n) 
  3. The cost of searching a binary tree is 0 (log n) but that of AVL tree is θ (n)  
  4. The cost of searching an AVL tree is θ (n log n) but that of binary search tree is θ (n)  

Answer (Detailed Solution Below)

Option 1 : The cost of searching an AVL tree is θ (log n) but that of binary search is 0(n) 
Free
UGC NET Paper 1: Held on 21st August 2024 Shift 1
50 Qs. 100 Marks 60 Mins

Detailed Solution

Download Solution PDF

The correct answer is The cost of searching an AVL tree is θ (log n) but that of binary search is 0(n) 

EXPLANATION:

  • AVL trees are a type of self-balancing binary search tree. The time complexity for search, insert, and delete operations in an AVL tree is O(log n), where "n" is number of nodes in the tree.
  • This is because AVL trees ensure that the tree remains balanced, thus keeping the height at log n.
  • On the other hand, a binary search tree (not necessarily balanced) could degenerate into something similar to a linked list in the worst-case scenario, leading to a time complexity of O(n) for aforementioned operations.
  • The statement jumbles up terminologies a bit; binary search typically refers to an operation performed on sorted arrays rather than trees, and that indeed has a time complexity of O(log n). But if we understand that it's referring to a binary search tree, the statement is correct.

The other options incorrectly state the time complexities for AVL and binary trees.

Latest UGC NET Updates

Last updated on Jun 27, 2025

-> Check out the UGC NET Answer key 2025 for the exams conducted from 25th June.

-> The UGC Net Admit Card has been released on its official website today.

-> The UGC NET June 2025 exam will be conducted from 25th to 29th June 2025.

-> The UGC-NET exam takes place for 85 subjects, to determine the eligibility for 'Junior Research Fellowship’ and ‘Assistant Professor’ posts, as well as for PhD. admissions.

-> The exam is conducted bi-annually - in June and December cycles.

-> The exam comprises two papers - Paper I and Paper II. Paper I consists of 50 questions and Paper II consists of 100 questions. 

-> The candidates who are preparing for the exam can check the UGC NET Previous Year Papers and UGC NET Test Series to boost their preparations.

Hot Links: teen patti master old version teen patti joy vip teen patti yas