UGC NET Dec-2020 and June-2021 Paper-2

October 9, 2023

2011 December UGC NET Paper 1

October 9, 2023

UGC NET Dec-2020 and June-2021 Paper-2

October 9, 2023

2011 December UGC NET Paper 1

October 9, 2023

Heap-Tree

Question 4

In a heap with n elements with the smallest element at the root, the 7th smallest element can be found in time

A
Θ(n log n)
B
Θ(n)
C
Θ(log n)
D
Θ(1)
Question 4 Explanation: 
The 7th smallest elements can be present in any of 7 levels. Then total possible elements can be present is seven levels is
1 + 2 + 4 + 6 + 8 + 16 + 32
Which is constant then we can find the 7th smallest element in Θ(1) time.
Correct Answer: D
Question 4 Explanation: 
The 7th smallest elements can be present in any of 7 levels. Then total possible elements can be present is seven levels is
1 + 2 + 4 + 6 + 8 + 16 + 32
Which is constant then we can find the 7th smallest element in Θ(1) time.

Leave a Reply

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