Week 9 - Sorting Algorithms

Outcomes

You should be able to:

 

Learning Materials

 

Getting Started

 

You Try It #1

 

You Try It #2

 

Explaining the YTIs

Now that you have done this, you can view my discussion about the two previous YTI activities.

Note, these videos are from a previous offering of the course. A few things may look different, but for the most part you should be able to follow along.

Bubble Sort

 

I'm not going to go into nearly the same level of detail with the other two sorts. Let's just convert them from pseudocode to python and then run them through PythonTutor. If you want to see paper walkthroughs for the pseudocode or talk to me about visualizing in Thonny, I will be happy to meet with you one-on-one and do this.

Insertion Sort

 

Selection Sort

Textbook Readings

It is also probably worth your time to read what your book says about these three sorts

Sort Efficiency

First of all, we want to consider, what is the Big-Oh notation for each of these three sorts.

 

You Try It #3