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
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
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
4
Q
What is the average asymptotic time complexity of an algorithm?
A
The algorithm’s average case complexity as n tends towards infinity