Week 5 - Recursive Sorts

YTI from last week

Last week I asked you to write two VERY simple recursive algorithms. Here is my code. YES this was "easy." But I really wanted you to understand the base pieces of recursion before we got harder (like below).

 

Recursive Sorts

Merge Sort

 

Quick Sort

 

You Try It

This week there are two "sets" of activities that I would like you to work on with your partner

  1. Code up the Merge and Quick sorts as explained above
    • Get together with a partner.
    • Discuss each algorithm. What does it do with the data in the list in order to sort the data?
    • As we did in week #3, you can use this replit file to attempt to write your code:
    • Write the code for each function to implement the algorithm shown above.
    • You can test your code by running and using testMyCode()

     

  2. Test the performance/efficiency evaluation of the code