Lil O Flashcards

1
Q

Quick sort typically has a Big 0 notation of?

A

0(N Log N)

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

What would 0(5*2^N + 1000N^100) reduce to?

A

0(2^N)

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

What would 0(B^2 + A) reduce to?

A

0(B^2 + A) can’t be reduced without special knowledge of A and B

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

If your algorithm is in the form “do this, then, when you’re all done, do that” what do you do with the runtimes?

A

you add the runtimes

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

If your algorithm is in the form “do this, then, when you’re all done, do that” what do you do with the runtimes?

A

you multiply the runtimes

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

If you only need to do one operation per item, what would the Big 0 notation be?

A

0(N) double check this

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

Notate constant time in Big 0

A

0(1)

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

Notate linear time in Big 0

A

0(N)

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