Counting Loops
Counting Loops
Assume Worst-Case Number of Iterations
Count Body, Multiply by Iteration Count
Assume Basic Operation is Addition
For i := 1 to 12 do
a := b+c
d := d + 7
End For
Total Operations = 24
Previous slide
Next slide
Back to the first slide
View Graphic Version