Algorithm Analysis Flashcards

1
Q

O(1)

A

Constant Time

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

O(log n)

A

Logarithmic TIme

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

O(n)

A

Linear TIme

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

O(n log n)

A

N Log N Time

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

O(n^p)

A

Polynomial Time

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

O(k^n)

A

Exponential Time

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

O(n!)

A

Factorial Time

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

Time proportional to input size

A

Constant Time

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

Time proportional to the logarithm of the input

A

Logarithmic Time

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

Time linearly proportional to the size of the input

A

Linear Time

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

Time proportional to n log n of input

A

N Log N Time

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

Time proportional to polynomial exponent of input

A

Polynomial Time

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

Time proportional to exponential growth of input

A

Exponential Time

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

Time proportional to factorial of input

A

Factorial Time

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

Loop running time is at most

A

The running time of the statements inside the loop multiplied by the number of iterations

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

Nested loop running time is at most

A

The product of the running time of all the loops

17
Q

Consecutive statements have the complexity

A

Of each of the statement’s running times added together

18
Q

If-then-else statements worst-case complexities equals

A

The test, plus either the then or the else part (whichever is larger)

19
Q

log x^y

A

y log x

20
Q

log xy

A

log x + log y

21
Q

log log n

A

log(log n)

22
Q

log^k n

A

(log n)^k

23
Q

log (x / y)

A

log x - log y

24
Q

Amortized Analysis

A

Determining the time-averaged running time for a sequence of operations