A description of the steps and decisions required to solve a problem. For example, to find the largest number in a list of positive numbers:

  • Note the first number as the largest.
  • Look through the remaining numbers, in turn, and if a number is larger than the number found in 1, note it as the largest.
  • Repeat this process until complete. The last noted number is the largest in the list.

An algorithm may be described in many ways. Flowcharts are often useful in visualising an algorithm.