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
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
3
Q
Constant o notation
A
O(1)
4
Q
Logarithmic big o notation
A
O(log n)
5
Q
Linder big o notation
A
O(n)
6
Q
Log liner
A
O( n log n)
7
Q
Quadratic big o notation
A
O(n^2)
8
Q
Exponential big o notation
A
O(c^N)
9
Q
Linked lists are good for
A
Adding/deleting in the front and middle
10
Q
Vectors are good for access anywhere but bad for in other positionins other than the backa?
A