Consider a MinHeap H1 and take the input of integers as follows and print the H1 based
Question:
- Consider a MinHeap H1 and take the input of integers as follows and print the H1 based on the index
2.Print the largest element of H1.
3.Delete the smallest element of H1 and display the updated H1.
4.Print the sum of the largest and smallest elements of the updated H1.
5.Print the index of the smallest element of the updated H1.
6.Consider the MaxHeap H2 and take the input of integers as follows and print the H2 based on the index.
7.Print the sum of all elements of the H2.
8.Add element 45 to H2 and print the updated H2.
9.Delete element 45 from H2 and print the updated H2.
10.Print the last element of the updated H2.
Computer Networking A Top-Down Approach
ISBN: 978-0133594140
7th edition
Authors: James Kurose, Keith Ross