SD07 - Complexity 1 Flashcards

1
Q

What is an algorithm?

A

A process for computing a function that is guaranteed to terminate for all (finite) inputs

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

What are the two most important characteristics used to compare algorithms?

A

Running time: Worst case, best case, and average case

Memory usage: Again, in the different cases

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

If an algorithm performs n^2/4 operations for an input of size n, what is the average asymptotic time complexity of the algorithm?

A

n^2

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

What is the average asymptotic time complexity of an algorithm?

A

The algorithm’s average case complexity as n tends towards infinity

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