Question: Please submit .C or .CPP and output file (.txt) together in a .zip file. Your program should do the followins: 1. Generate 50,000 integer number

Please submit .C or .CPP and output file (.txt) together in a .zip file. Your program should do the followins: 1. Generate 50,000 integer number where each number should be between 0 to 1000. 2. Save this integer numbers in a text file. Each line of that file will contain exactly one number. So there will be total 50,000 lines. 3. Now implement three sorting algorithms (bubble, selection and heap) to sort these data. Note that, you should not change the content of the input file while the sorting algorithms are running. 4. For each of the sorting algorithm, create three different output files (bubble.txt, selection.txt and heap.txt) which will contain the output of the sorting algorithms (i.e. data should be sorted from minimum to maximum). Again, each line will contain exactly one number. 5. Create another .txt file (comparison.txt) which will show the number of loops each algorithm has taken to sort these data. The format of the comparison file should be as follows: Bubble Selection Heap 120000 60000 12000

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!