Question: Implement a program that applies heap sort using heap tree insertion and removing. Your Program should: ==> Create a file consisting of unsorted random numbers

Implement a program that applies heap sort using heap tree insertion and removing. Your Program should:

==> Create a file consisting of unsorted random numbers 18,29,8,12,4,3,15,11,1,2

==> Read numbers from unsorted file one by one and construct a heap tree

==> After all numbers are inserted into heap tree, remove all of them one by one and write the removed number into a new sorted file.

==> After sorted file is completed, print sorted numbers on the screen.

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!