Question: IN JAVA 3. Sorting-3 a. Implement 3-way Quicksort for a linked list. Define these methods for the class: i. LinkedList(); constructor ii. add(int a);--Adds a

IN JAVA

IN JAVA 3. Sorting-3 a. Implement 3-way Quicksort for a linked list.

3. Sorting-3 a. Implement 3-way Quicksort for a linked list. Define these methods for the class: i. LinkedList(); constructor ii. add(int a);--Adds a number to the linked list iii. printList();--Prints the current list contents to console as comma separated values ("1,2,3" iv. quicksort) Runs 3-way quicksort. b. Your requirements for quicksort: i. It must shuffle the linked list. Note: there is no restriction on how you shuffle the list. It is up to you. We will test runtime for different insertions to validate the shuffle. li. It must print out every comparison and what is being compared. ii It should print out every swap. iv. It should print out the current list after finishing a partition (pivot is placed in final location) It should initially use median of 3 selection for the pivot in the first partition. For this problem, include only the class files/code files. No main function file is needed. v. vi. 3. Sorting-3 a. Implement 3-way Quicksort for a linked list. Define these methods for the class: i. LinkedList(); constructor ii. add(int a);--Adds a number to the linked list iii. printList();--Prints the current list contents to console as comma separated values ("1,2,3" iv. quicksort) Runs 3-way quicksort. b. Your requirements for quicksort: i. It must shuffle the linked list. Note: there is no restriction on how you shuffle the list. It is up to you. We will test runtime for different insertions to validate the shuffle. li. It must print out every comparison and what is being compared. ii It should print out every swap. iv. It should print out the current list after finishing a partition (pivot is placed in final location) It should initially use median of 3 selection for the pivot in the first partition. For this problem, include only the class files/code files. No main function file is needed. v. vi

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!