Comment on page
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
- Letbe the count of how many times that operation occurs as a function of.
- Determine order of growthfor, i.e.
- Often (but not always) we consider the worst case count.
- If operation takes constant time, then.