Algorithms
An algorithm is a precise, step-by-step method for solving a problem.
Example 1.1.1.
Compute 1 + 2 + 3 + ··· + n
1. sum = 0
2. i = 0
3. i = i + 1
4. sum = sum + i
5. Repeat lines 3 and 4 until i == n.
Previous slide
Next slide
Back to first slide
View graphic version