8.3: Elementary Sorts

We now turn our attention to three simple sorting methods applicable to records stored in arrays: (1) maximum entry sort, (2) bubble sort, and (3) insertion sort. They are also applicable to records stored in lists. Understanding their limitations and how they work sets the stage for the more complex structures and algorithms of the next section.

8.3.1 Maximum Entry Sort

8.3.2 Bubble Sort

8.3.3 Timing the Bubble Sort

8.3.4 Insertion Sort

8.3.5 Timing the Insertion Sort

8.3.6 Attempted Improvements