Yes! Sorting!

Yes, it wouldn't be an algorithm course without at least a couple sorts! I know... we will implement a sorting algorithm (actually 2 of them).















BubbleSort

Yes, lets do bubble sort. Usually the first algorithm in almost every major source is insertion sort, but I find it so boring! Lets do bubble!

As my teacher once said...

To the whiteboard!















So what's the running time?

back to the whiteboard!















Depending on the time, we will implement this...

To the typescript! or to the next part!















There are other sorting strategies I want to talk about but...

There is more sorting algorithms to deal with, and we will, but we haven't covered recursion, so we will hold off.















Questions?

  • Only one time have i ever had to implement a sorting algorithm.