Sorting algorithms Flashcards
1
Q
What is the time complexity of bubble sort?
A
O (n^2)
2
Q
What is the time complexity of insertion sort?
A
O (n^2)
3
Q
What is the time complexity of merge sort?
A
O (n log(n))
4
Q
What is the time complexity of quick sort?
A
O(n^2)