大象传媒

Algorithms - EdexcelWritten descriptions

Algorithms are step-by-step plans for solving problems. Algorithms can be designed using pseudo-code, flowcharts, written descriptions and program code. There are also some standard algorithms for searching and sorting.

Part of Computer SciencePrinciples of computer science

Written descriptions

can also be 鈥榳ritten descriptions鈥. There is no defined format for this, so programmers are free to write as they wish. Short sentences are best. An algorithm should be easy to understand and have no unnecessary detail. A recipe is a good example of clear instructions, eg 鈥榮tir鈥 and 鈥榖ake鈥. A written description should include all the elements found when decomposing the problem.

Advantages and disadvantages of using written descriptions

Designing an algorithm using written descriptions has advantages because:

  • there is no need to worry about using correct
  • it feels more natural to use normal writing

The main disadvantage of a written description is that there is a temptation to use too many words. This makes the algorithm descriptive rather than instructional.