Ch1 Flashcards
1
Q
Algorithm
A
A set of instructions for accomplishing a task.
2
Q
Binary search
A
Only works on sorted data sets
Log(n)
3
Q
Simple search
A
Runs in N time
4
Q
Does big O establish a worse case or average case?
A
Worst case
5
Q
5 most common big O runtimes fast to slowest
A
Log n binary search
N - simple search
N log n - fast sorting algorithm like quick sort
N^2 - slow sorting like selection sort
N! -traveling salesperson
6
Q
Things to ignore in big o
A
Numbers that are added, subtracted, calculated or divided.