Big O Flashcards

1
Q

what is the technical name for big o?

A

asymptotic runtime

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

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

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

what is the big o of binary search

A

O(log N)

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

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