1.0 KiB
1.0 KiB
date | type |
---|---|
02.09.2024 | mixed |
Sorting algorithms and their complexity
Algorithm | Time Complexity |
---|---|
Selection | \mathcal{O}(n^2) |
Insertion | \mathcal{O}(n^2) |
Bubble | \mathcal{O}(n^2) |
Quick | \mathcal{O}(n^2) worst case, \mathcal{O}(n\log n) average |
Merge | \mathcal{O}(n\log n) |
Heap | \mathcal{O}(n\log n) |