Activity 02: Sorting 2
Learning Goals
You will work towards being able to…
- Formalize algorithmic ideas into pseudocode
- Compute growth functions from time & space complexities under the RAM model
- Determine the Big-O, big-$\Omega$, and big-$\Theta$ time complexities of algorithms
- Know common algorithms to solve cannonical problems (sorting)
Instructions
-
Look back at the pseudocode you’ve written for Activity 1 (check your Moodle submission)
-
Determine an explicit growth function for your pseudocode’s worst-case time complexity. If the sort algorithm you found is suspiciously similar to insertion sort, take a moment to chat with an adjacent group and acquire a copy of their pseudocode
-
Use your prior background from COMP128 to speculate about the big-Oh time complexity of your algorithm. Do people at the table agree?
-
Formally demonstrate how your growth function fits that time-complexity. Consider both big-O and big-$\Omega$ (and, thus, big-$\Theta$).
-
If you have extra time, consider the best-case time complexity! When does that occur?
-
For credit: Submit some artifact of your work to Moodle, including, at least, the growth function and the time complexity (in Big-Oh) that you found.