4-C: Sorting
We will write our most complex algorithms as we study efficient ways to sort collections of data. Some of these algorithms will require recursion, our most abstract and challenging topic to date.
Learning Targets
Algorithms
Efficiency
Searching



Selection Sort







Insertion Sort


Step 1: Nested loop with an inner loop traversing in reverse.

Still Step 1: The inner loop doesn't need to start at index[0]
[0]
Step 2: The inner loop goes backwards so long as the number that the outer loop has is bigger

Step 3: You'll have to move numbers over as you go to make room




Assignment

Recursion



Merge Sort



Assignment
Last updated
Was this helpful?
