Question 7875 – Data-Structures
April 17, 2024
Question 8226 – Data-Structures
April 17, 2024
Question 7875 – Data-Structures
April 17, 2024
Question 8226 – Data-Structures
April 17, 2024

Question 8191 – Data-Structures

Consider a max heap, represented by the array: 40, 30, 20, 10, 15, 16, 17, 8, 4.

Now consider that a value 35 is inserted into this heap. After insertion, the new heap is

Correct Answer: B

Question 10 Explanation: 
Given max. heap is

Heapification:

Array representation of above max-heap is (BFS)

40, 35, 20, 10, 30, 16, 17, 8, 4, 15

A
40, 30, 20, 10, 15, 16, 17, 8, 4, 35
B
40, 35, 20, 10, 30, 16, 17, 8, 4, 15
C
40, 30, 20, 10, 35, 16, 17, 8, 4, 15
D
40, 35, 20, 10, 15, 16, 17, 8, 4, 30
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!!