Big O Flashcards
1
Q
what is the technical name for big o?
A
asymptotic runtime
2
Q
when do you add run times when calculating big o
A
If your algorithm is in the form “do this, then, when you’re all done, do that”then you add the runtimes
for {}
for {}
3
Q
when do you multiply the run times?
A
If your algorithm is in the form “do this for each time you do that”then you multiply the runtimes.
for {
for{}
}
4
Q
what is the big o of binary search
A
O(log N)
5
Q
When you see a problem where the number of elements in the problem space gets halved each time the big O is most likely to be
A
O(log N)