Question: Please slove all question sir.... take time using C++ Program Binary Heap 1. Write a program to find k largest element in an array. You

Please slove all question sir....
take time
using C++ Program
Binary Heap 1. Write a program to find k largest element in an array. You have use binary heap to solve the above mentioned problem Sample Input 1,23, 12, 9, 30, 2, 50 Sample Output K:3 Element: 50, 30,23 2. Write a program to sort elements of an array in ascending order using Binary Heap. Sample Input 12, 11, 13, 5, 6, 7 Sample Output 5 6 7 11 12 13 3. Write a program to convert an array representing Min Heap to Max Heap. Sample Input 35 9 6 8 20 10 12 18 9 Sample Output 20 18 10 12 9 935 6 8 or (any Max Heap formed from input elements] 4. Write a program to find smallest and largest element of a binary heap. Sample Input Sample Output 35 9 6 8 20 10 12 18 9 Min: 3 Max: 20
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
