https://cs.slides.com/colt_steele/intermediate-sorting-algorithms
Faster Sorts
- There is a family of sorting algorithms that can improve time complexity from O(n^2) to O(n log n)
- There’s a tradeoff between efficiency and simplicity.
- The more efficient algorithms are much less simple, and generally take longer to understand.
- Let’s dive in!
Merge Sort
Quick Sort
Comparison Sorts
— Average Time complexity
- Bubble Sort - O(n^2)
- Insertion Sort - O(n^2)
- Selection Sort- O(n^2)
- Quick Sort- O(n log(n))
- Merge Sort - O(n log(n))
can we do better??