Question: Create a program named sort.java that reads in primes1.txt. Sort these numbers using bubble, selection, merge, and radix sorts. Each sort should list the elapsed

 Create a program named sort.java that reads in primes1.txt. Sort these

Create a program named sort.java that reads in primes1.txt. Sort these numbers using bubble, selection, merge, and radix sorts. Each sort should list the elapsed time, iterations, and print the first 10 and last 10 numbers in the sorted array. Example output This program compares the bubble, selection, merge, and radix sorts. The data set is 100000 prime numbers unsorted 1. Bubble Sort Seconds to sort = ??? Number of iterations - ??? First 10 - 2 3 5 7 11 17 23 29 31 37 Last 10 - 1299553 1299583 1299601 1299631 1299637 1299647 1299653 1299673 12996891299709 2. Selection Sort Seconds to sort = ??? Number of iterations = ??? First 10 - 2 3 5 7 11 17 23 29 31 37 Last 10 - 1299553 1299583 1299601 1299631 1299637 1299647 1299653 1299673 1299689 1299709 3. Merge Sort Seconds to sort = ??? Number of iterations = ??? First 10 - 2 3 5 7 11 17 23 29 31 37 Last 10 - 1299553 1299583 1299601 1299631 1299637 1299647 1299653 1299673 1299689 1299709 4. Radix Sort Seconds to sort = ??? Number of iterations = ??? First 10 - 2 3 5 7 11 17 23 29 31 37 Last 10 - 1299553 1299583 1299601 1299631 1299637 1299647 1299653 1299673 1299689 1299709

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!