Overview of Problem Solving

Writing an Algorithm

What is an Algorithm?

An algorithm is a set of sequential instructions written in a logical order to solve a problem. It is a plan. It can be defined as a set of steps that are unambiguous and precise.

Everyday Example: "I need to go to school." The algorithm could be:

1.      Wake up.

2.      Get out of bed.

3.      Wash.

4.      Put on clothes.

5.      Eat.

6.      Take my bag.

7.      Go to school.

Properties: Some steps can be swapped (e.g., you may eat before getting dressed), but it is not possible to go to school before waking up. The order must be logical.