An algorithmA sequence of logical instructions for carrying out a task. In computing, algorithms are needed to design computer programs. is a logical, step-by-step process for solving a problem. Algorithm production is part of algorithmic thinking, an important concept in computational thinking. This focuses on how a desired solution can be reached by identifying the steps needed to get there. You can read more about this in the guide.
Algorithms are normally written as one of the following:
pseudocode Also written as pseudo-code. A method of writing up a set of instructions for a computer program using plain English. This is a good way of planning a program before coding.
a flowchartAlso known as a flow diagram. A diagram that shows the step-by-step flow of an algorithm.
An algorithm should be seen as a starting point before writing a programSequences of instructions for a computer.. The finished program should follow the steps the algorithm describes.
Before an algorithm can be designed, it is important to check that the problem is completely decompositionThe breaking down of a system into smaller parts that are easier to understand, program and maintain.. The decomposed problem should consider:
What are the inputData which is inserted into a system for processing and/or storage. into the problem?
What will be the outputData which is sent out of a system. of the problem?
In what order do instructionA single action that can be performed by a computer processor. need to be carried out?
What decisions need to be made in the problem?
Are any areas of the problem repeated?
Only when a problem is properly decomposed and understood can an algorithm design begin.