Midterm

22 flashcardsby Jared
Study these flashcardsFree · spaced repetition · iPhone, Android, Mac & web

All cards

1
Only sorts numbers. Sort by each digit one at a time going from right-most digit to left-most
Radix Sort
2
Big-O of Radix Sort
O(n)
3
Big-O of Counting Sort
O(n)
4
Big-O of Bucket Sort
O(n)
5
Big-O of Merge Sort
O(nlogn)
6
Big-O of Heap Sort
O(nlogn)
7
Big-O of Quicksort
O(n^2)
8
Big-O of Bubble Sort
O(n^2)
9
Big-O of Insertion Sort
O(n^2)
10
Big-O of Selection Sort
O(n^2)
11
Big-O of Sequential Search
O(n)
12
Big-O of Binary Search
O(logn)
13
Average complexity
Big Theta
14
Worst case complexity
Big O
15
Best case complexity
Big Omega
16
logba > exponent on f(n)
O(n^(logba))
17
logba < exponent on f(n)
O(f(n))
18
logba == exponent on f(n)
O(f(n)*log2n)
19
Go through list, swapping values two at a time if out of place. Larger numbers gradually move towards the end.
Bubble Sort
20
Work left to right. Examine each item and compare it to items on its left. Insert the item in the correct position in the array.
Insertion Sort
21
During each iteration, select the smallest item from the unsorted partition and move it to the sorted partition.
Selection Sort
22
Go through each number. If less than pivot, swap it with the first value greater than the pivot. Place pivot between smaller numbers and larger numbers.
Partition algorithm
Study all 22 cards for free