Question: Two of the sorting algorithms that seem to be the hardest for students to understand are: Shell sort Quick sort For this homework problem, choose

Two of the sorting algorithms that seem to be the hardest for students to understand are:

Shell sort

Quick sort

For this homework problem, choose the sort that you understand the LEAST. Then write a Java program that will help someone understand the algorithm, by explaining each step, as it happens.

Two of the sorting algorithms that seem to be the hardest for

To keep things simple, you can just implement your program using one Java class, containing all the necessary methods to sort and display the list. The program will sort only specific sized lists. The program will: Display which sort will be implemented and then read the number of items to sort from the user (and error check that the size entered is at least 12 and less than 100, looping until a good value is entered). (2 pts) Create an array of that size and read the initial values into the list from input file of integers, unsorted.txt (located in an input directory within your NetBeans project). (3 pts) o The input file will contain 99 randomly ordered integers, separated by whitespace. You should create a sample file yourself, for testing But your instructor will test your program using their own data file. * Call the sort to sort the list into ascending order. The parameters will be the list and two integer indexes, representing the first index, and the last index of the part of the list to be sorted. (see Appendices for pts) . For example, the calls a list that has 25 items in it would be: quickSort(list, 0, 24) shellsort (list, 0, 24); or .When the sort is complete, display the sorted list's indexes and values, neatly to the screen WARNING: The purpose of the assignment is to provide a thorough walkthrough description of the sort. Simply implementing the sort, without the required displays will earn only 10 of the 40 points

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!