UGC NET Dec2020 and June2021 Paper2
October 9, 20232011 December UGC NET Paper 1
October 9, 2023HeapTree
Question 4

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


Θ(n)


Θ(log n)


Θ(1)

Question 4 Explanation:
The 7^{th} 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 7^{th} smallest element in Θ(1) time.
1 + 2 + 4 + 6 + 8 + 16 + 32
Which is constant then we can find the 7^{th} smallest element in Θ(1) time.
Correct Answer: D
Question 4 Explanation:
The 7^{th} 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 7^{th} smallest element in Θ(1) time.
1 + 2 + 4 + 6 + 8 + 16 + 32
Which is constant then we can find the 7^{th} smallest element in Θ(1) time.
Subscribe
Login
0 Comments