Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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:

  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 leaveCount() that takes as a parameter a pointer to the root node of a heap and returns the number of leaves

Note:

  1. 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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design Using Entity Relationship Diagrams

Authors: Sikha Saha Bagui, Richard Walsh Earp

3rd Edition

103201718X, 978-1032017181

More Books

Students also viewed these Databases questions