...
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.
0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x
error: Alert: Content selection is disabled!!