CSE 373 Lecture Notes - Lecture 8: Insertion Sort, Selection Sort, Merge Sort
CSE 373 Lecture 8
Insertion Sort:
-
- Worst case runtime O(n2)
- Best case runtime O(n)
- Average runtime O(n2)
- Stable? Yes
- In-place? Yes
Selection Sort:
- Loop through end to find next smallest item
- Worst case runtime O(n2)
- Best case runtime O(n2)
- Average runtime O(n2)