COSC 122 Test Flashcards
1
Q
Insertion sort best case
A
n (sorted array)
2
Q
Insertion sort worst case
A
n^2
3
Q
Insertion Avg
A
n^2
4
Q
Selection sort Best case
A
n^2
5
Q
Selection worst
A
n^2
6
Q
Selection Avg
A
n^2
7
Q
Sequential Sort big O
A
O(n)
8
Q
Binary Search Big O
A
O(logn)
9
Q
Shell sort best case
A
n (logn)
10
Q
Shell sort worst/Avg
A
n(logn)^2
11
Q
Hash table best/Avg
A
O(1)
12
Q
Hash Successful equation
A
1 + (load_factor / 2)
13
Q
Hash unsuccessful
A
load_factor
14
Q
Insertion comparisons
A
n-1
15
Q
Selection comparisons
A
(n(n-1))/2