- The selection sort – for each element – finds the minimum value from that element and switches the two elements.
- The quick sort chooses a “pivot” from the beginning of the list, and splits the unsorted list into halves – the first half being smaller than the pivot, the second half being larger. The first pivot is now sorted (and is in the middle of the list), so the new first element becomes the pivot, and the process is [recursively] begun again.
- The merge sort, on the other hand, continually halves an unsorted list, then sorts those “halves” and then finally combines all of these halves to create a sorted list.
In the class, I came to learn that essentially, the efficiency of any algorithm can be modeled as a function of its input size. The Big-O notation expresses the worst-case scenario of the algorithm by extracting the part of the function that causes the function to grow the fastest.
That's all for the last slog! LoL!