A6 Searching and Sorting - sheerazwalid/COMP-I GitHub Wiki

Simple sorting algorithms

The sorting algorithm that I use usually cover in this course is called selection sort. I think it's the easiest to understand. I believe it mirrors the way I would manually sort a list of values.

Complex sorting algorithms

There is a big difference between the efficiency of the simple sorting algorithms and the complex ones. The simple sorting algorithms have running times that are proportional to the square of the number of values in the array to be sorted. The complex algorithms have running times that are proportional to the number of values in the array times the log of the number of values in the array. This ends up making a big difference when the number of values in the array starts to become large. The second exercise in the associated assignment is designed to give you a concrete experience of this difference.

Optional Videos