Runtime Complexity Flashcards

1
Q

What is o notation

A

Mathmaticall way of describing how a function generally behaves in relation to the input size, all functions have the same growth rate

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

Big o notation rules

A
If f(x) is a sum of several terms, the higher order term is kept and others are discarded 
If f(x) has a term that is product of serval factors, all constant are omitted
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Constant o notation

A

O(1)

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

Logarithmic big o notation

A

O(log n)

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

Linder big o notation

A

O(n)

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

Log liner

A

O( n log n)

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

Quadratic big o notation

A

O(n^2)

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

Exponential big o notation

A

O(c^N)

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

Linked lists are good for

A

Adding/deleting in the front and middle

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

Vectors are good for access anywhere but bad for in other positionins other than the backa?

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