It's C++ language questions, but answer in drawing circle.
Please draw in paint:
Given an array
int alt = {100, 50, 10, 7, 6, 4, 1}
-Construct Max Heap
-Remove all nodes and after each removal sort heap back to max
heap
Thanks
heap deletion happens from the root and it is replaced with the last element of the heap. then do heapify and swap depending on whether the value at the root is bigger or not
It's C++ language questions, but answer in drawing circle. Please draw in paint: Given an array int alt = {100, 50, 10, 7, 6, 4, 1} -Construct Max Heap -Remove all nodes and after each removal sor...