2.3.3 average time complexities of different sorting algorithms Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

Merge sort

A

O(nlog(n)) but requires more space for the merging process

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Quick sort

A

O(nlog(n)) (the fastest of all of the sorts)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Insertion sort

A

O(n^2) but it becomes O(n) is almost already sorted

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Bubble sort

A

O(n^2) (the slowest out of all the sorting methods)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly