Sorting Algos Flashcards

1
Q

Quicksort Time Complexity

A

Best: O(n log(n))
Avg: O(n log(n))
Worst: O(n^2)

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

Mergesort Time Complexity

A

Best/Avg/Worst: O(n log(n))

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

Heapsort Time Complexity

A

Best/Avg/Worst: O(n log(n))

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

Bubble Sort Time Complexity

A

Best: O(n)
Avg: O(n^2)
Worst: O(n^2)

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

Insertion Sort Time Complexity

A

Best: O(n)
Avg: O(n^2)
Worst: O(n^2)

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

Selection Sort Time Complexity

A

Best: O(n^2)
Avg: O(n^2)
Worst: O(n^2)

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

Radix Sort Time Complexity

A

Best/Avg/Worst: O(nk)

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

Quicksort Space Complexity

A

O(log(n))

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

Mergesort Space Complexity

A

O(n)

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

Heapsort Space Complexity

A

O(1)

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

Bubble Sort Space Complexity

A

O(1)

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

Insertion Sort Space Complexity

A

O(1)

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

Selection Sort Space Complexity

A

O(1)

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

Radix Sort Space Complexity

A

O(n+k)

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