Big O Notations - Sorting Algorithms Flashcards

1
Q

Big O for Quicksort

A

Time
Best: Ω(n log(n))
Average: Θ(n log(n))
Worst: O(n^2)

Space
Worst: Θ(log(n))

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

Big O for Mergesort

A

Time
Best: Ω(n log(n))
Average: Θ(n log(n))
Worst: Θ(n log(n))

Space
Worst: O(n)

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

Big O for Timsort

A

Time
Best: Ω(n)
Average: Θ(n log(n))
Worst: 0(n log(n))

Space
Worst: O(n)

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

Big O for Heapsort

A

Time
Best: Ω(n log(n))
Average: Θ(n log(n))
Worst: O(n log(n))

Space
Worst: O(1)

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

Big O for Bubble Sort

A

Time
Best: Ω(n)
Average: O(n^2)
Worst: O(n^2)

Space
Worst: O(1)

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

Big O for Insertion Sort

A

Time
Best: Ω(n)
Average: O(n^2)
Worst: O(n^2)

Space
Worst: O(1)

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

Big O for Selection Sort

A

Time
Best: Ω(n^2)
Average: O(n^2)
Worst: O(n^2)

Space
Worst: O(1)

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

Big O for Tree Sort

A

Time
Best: Ω(n log(n))
Average: Θ(n log(n))
Worst: O(n^2)

Space
Worst: O(n)

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

Big O for Shell Sort

A

Time
Best: Ω(n log(n))
Average: Θ(n(log(n))^2
Worst: Θ(n(log(n))^2

Space
Worst: O(1)

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

Big O for Bucket Sort

A

Time
Best: Ω(n+k)
Average: O(nk)
Worst: O(n^2)

Space
Worst: O(n)

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

Big O for Radix Sort

A

Time
Best: Ω(nk)
Average: Θ(nk)
Worst: O(nk)

Space
Worst: O(n+k)

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

Big O for Counting Sort

A

Time
Best: Ω(n+k)
Average: Θ(n+k)
Worst: O(n+k)

Space
Worst: O(k)

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

Big O for Cubesort

A

Time
Best: Ω(n)
Average: Θ(n log(n))
Worst: Θ(n log(n))

Space
Worst: O(n)

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