Suppose we insert 19 into the min heap [17,25,42,67,38,89,54,98,89]. What is the resulting heap?
Answers
Answered by
4
Answer:
[17, 19, 42, 67, 25, 89, 54, 98, 89, 38]
Explanation:
Answered by
3
Explanation:
In the minimum heap data structure, the parent node has always less or equal value than the child nodes. As per given information, when we insert 19 into the given heap [17,25,42,67,38,89,54,98,89], then the result would be as
Minimum Heap Sort
17
19 25
38 42 54 67
89 89 98
Hence we can write the output as;
[17, 19, 25, 38, 42, 54, 67, 89, 89, 98]
Similar questions