13.9 Summary
Last updated
Last updated
To summarize this chapter:
Given a piece of code, we can express its runtime as a function
is a property of the input of the function often representing the size of the input
Rather than finding the exact value of , we only worry about finding the order of growth of .
One approach (not universal):
Choose a representative operation
Let be the count of how many times that operation occurs as a function of .
Determine order of growth for , i.e.
Often (but not always) we consider the worst case count.
If operation takes constant time, then .