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
8.7 K Users
50 Questions 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 6, 2025

-> The UGC NET Exam Schedule 2025 for June has been released on its official website.

-> The UGC NET Application Correction Window 2025 is available from 14th May to 15th May 2025.

-> The UGC NET 2025 online application form submission closed on 12th May 2025.

-> The June 2025 Exam will be conducted from 21st June to 30th 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.

Get Free Access Now
Hot Links: teen patti gold download teen patti wink teen patti noble