Chaper 2 Basics of Algorithm Analysis Flashcards
What two things does analyzing an algorithm include?
Resource requirements when it comes to space and time.
How do you normally express resource requirements?
As how the required resources scale with input size.
What is meant by a problem being easier than another?
That there exist algorithms such that one is faster, often with respect to input size.
What is meant by the time complexity of a given algorithm?
The algorithm’s running time for every instance. It is often simplified to a running time for every instance size n.
What is meant by worst-case and average-case running time?
Worst case: The largest running time for an instance of a given size n.
Average case: The average running time for every instance size n.