Question: Write a program to: Build a heap using user input elements and print the heap (in order) Delete the elements from the heap which are
Write a program to:
- Build a heap using user input elements and print the heap (in order)
- 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
- Allow user to check the level of any node which he/she wants to
- Write a function leaveCount() that takes as a parameter a pointer to the root node of a heap and returns the number of leaves
Note:
- This should not be a complete executable program. Non executable programs will cost marks
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
