Question 9525 – Heap-Tree
January 17, 2024
Question 7137 – NVS PGT CS 2019 Part-A
January 18, 2024
Question 9525 – Heap-Tree
January 17, 2024
Question 7137 – NVS PGT CS 2019 Part-A
January 18, 2024

Question 9323 – Heap-Tree

In a binary max heap containing n numbers, the smallest element can be found in time

Correct Answer: A

Question 7 Explanation: 
In a MAX heap the smallest values of the heap will always be present on the last level of heap and time complexity of reaching the last level of heap is O(n).
We have to search all the elements to reach the smallest element and heap using linear search.
To traverse all elements using linear search will take O(n) time.
A
O(n)
B
O(log n)
C
O(log log n)
D
O(1)
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!!