2.3.3 average time complexities of different sorting algorithms Flashcards
1
Q
Merge sort
A
O(nlog(n)) but requires more space for the merging process
2
Q
Quick sort
A
O(nlog(n)) (the fastest of all of the sorts)
3
Q
Insertion sort
A
O(n^2) but it becomes O(n) is almost already sorted
4
Q
Bubble sort
A
O(n^2) (the slowest out of all the sorting methods)