The framework for measuring running time: worst, best and average case, the O, Ω and Θ notations, rules for analysing loops, and recurrences for recursive algorithms.
After this chapter you can:
Measure an algorithm’s running time as a function of its input size, in the worst, best and average case.
Use the O, Ω and Θ notations, and compare two orders of growth with the limit method.
Compute the running time of loops and nested loops with the general rules.
Set up and solve the recurrence of a recursive algorithm (factorial, Tower of Hanoi, binary digits).
Apply the standard summation formulas.
Slides: 25 · Worked examples: The Maximum Subsequence Sum Problem , Exponentiation
Slides ¶ Present full screen
Download the PDF
Click or tap the slide to move forward, its left edge to go back; the arrow keys work too.