Ch1 Flashcards

1
Q

Algorithm

A

A set of instructions for accomplishing a task.

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

Binary search

A

Only works on sorted data sets
Log(n)

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

Simple search

A

Runs in N time

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

Does big O establish a worse case or average case?

A

Worst case

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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

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

Things to ignore in big o

A

Numbers that are added, subtracted, calculated or divided.

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