Algorithms Flashcards
1
Q
Selection Sort
Time Complexity
A
Average: O(n2)
Worst: O(n2)
2
Q
Quicksort
Time Complexity
A
Average: O(n log n)
Worst: O(n2)
3
Q
Insertion Sort
Space Complexity
A
O(1)
4
Q
Bubble Sort
Space Complexity
A
O(1)
5
Q
Insertion Sort
Time Complexity
A
Average: O(n2)
Worst: O(n2)
6
Q
Radix Sort
Space Complexity
A
O(n+k)
7
Q
Heapsort
Space Complexity
A
O(1)
8
Q
Mergesort
Space Complexity
A
O(n)
9
Q
Bubble Sort
Time Complexity
A
Average: O(n2)
Worst: O(n2)
10
Q
Bucket Sort
Time Complexity
A
Average: O(n + k)
Worst: O(n2)
11
Q
Mergesort
Time Complexity
A
Average: O(n log n)
Worst: O(n log n)
12
Q
Radix Sort
Time Complexity
A
Average: O(nk)
Worst: O(nk)
13
Q
Heapsort
Time Complexity
A
Average: O(n log n)
Worst: O(n log n)
14
Q
Quicksort
Space Complexity
A
O(log n)
15
Q
Bucket Sort
Space Complexity
A
O(n)