Question: Write a program to: [120] = 20 1. Build a heap using user input elements and print the heap (in order) 2. Delete the
Write a program to: [120] = 20 1. Build a heap using user input elements and print the heap (in order) 2. Delete the elements from the heap which are divisible by 5, print the deleted elements and rebuild the heap. If there is no element divisible by five or heap is empty then print an appropriate message 3. Allow user to check the level of any node which he/she wants to 4. Write a function leave Count() that takes as a parameter a pointer to the root node of a heap and returns the number of leaves
Step by Step Solution
There are 3 Steps involved in it
Answer Heres a C program that implements the functionalities you described include include include using namespace std Function to print the elements ... View full answer
Get step-by-step solutions from verified subject matter experts
