Question: Write the functions add( ), delete( ), build( ), heapify( ) [swim up], sink( () and heapSort( ) for a Min Heap Data Structure. Create

 Write the functions add( ), delete( ), build( ), heapify( )

Write the functions add( ), delete( ), build( ), heapify( ) [swim up], sink( () and heapSort( ) for a Min Heap Data Structure. Create a .txt file containing a bunch of numbers. Read the input from there and use the build( ) function to create a heap. Then ask the user to enter a command. 'A' for adding a new number, ' B ' for deleting, and ' S ' for sorting

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!