To start, create your own set of 10 numbers in an array that are not sorted. Using your array, do the following exercises: Show how the Mergesort algorithm sorts your array by: Showing which sub parts...


To start, create your own set of 10 numbers in an array that are not sorted. Using your array, do the following exercises:


Show how the Mergesort algorithm sorts your array by:



  • Showing which sub parts of the array are being examined with each recursive call to Mergesort

  • Showing the results of the array each time the Merge function is used



Your demonstration should be similar to slides 19-33 in the Mergesort presentation. You do not have to show the details of the function calls in the stack (unless it helps you), but do explain what is happening at each step to show understanding of the algorithm and receive partial credit if you’re incorrect.


Using your same original array, show how the Quicksort algorithm sorts this array by:



  • Showing the results of the array each time the Partition function is used

  • Showing which sub parts of the array are being examined with each recursive call to Quicksort


Your demonstration should be similar to slides 35-64 in the Quicksort presentation. Again, you do not have to show all the details of the function calls in the stack in the slides (unless it helps you), but do explain what is happening at each step that you show.



Jun 11, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here