Question: CSC 220 Data Structures Homework #6 Advanced Sorting Algorithms: Part 1 Due: Name 1. (3pt) Sort the following list of numbers using cocktail sort, Show

 CSC 220 Data Structures Homework #6 Advanced Sorting Algorithms: Part 1
Due: Name 1. (3pt) Sort the following list of numbers using cocktail

CSC 220 Data Structures Homework #6 Advanced Sorting Algorithms: Part 1 Due: Name 1. (3pt) Sort the following list of numbers using cocktail sort, Show the result of each pass in both the forward and backward directions. Underline the unsorted portion after each pass. 6, 9, 5, 3, 7,4, 1, 2, 8,0 Original List Pass 1 (forward) Pass 1 (backward) (3pt) Sort the following list of numbers using somb sort, Start with a gap size equal to the length of the list divided by 1.3 and reduce it by 1.3 after each pass. Show the list and state the gap size used after each pass. 2. Gap Size 6, 9, 5,3,7, 4, 1, 2,8, 0 Original List Pass 1 10/1.3 7 3. (3pts) Explain why cocktail and comb sort are faster (in the practical sense) than bubble sort 4. (3pt) Sort the following list of numbers using shell sort. Use the following gap sequence: 5, 3, 2, 1. Show the list after each pass 6, 9, 5, 3, 7, 4, 1, 2, 8,0 Gap Size Original List Pass 1 5. (3pts) Explain why shell sort is faster (in the practical sense) than insertion sort

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!