#16 algorithm analysis Flashcards

1
Q

upper bound

A

big-O represent the upper bound of the number of operations performed in an algorithm

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

big-O formal definition

A

T(n) is O(f(n)) if some constant C > 0 and n(sub zero) >= 1, cx f(n) >= T(n) everywhere that n>= n(sub zero)

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

asymptotic complexity

smallest to largest

A
O(1) constant
O(log(n)) logarithmic
O(n) linear
O(n log(n)) n log n
O(n^2) quadratic
O(n^3) cubic
O(n^k) polynomial
O(k^n) exponential
O(n!) factorial
O(n^n) n to the n
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

critical section

A

executed the most, the operation is central to the algorithm, in deeply nested for loops

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