The following is an algorithm for making a cup of tea.

  1. Put the teabag in a cup.
  2. Fill the kettle with water.
  3. Boil the water in the kettle.
  4. Pour some of the boiled water into the cup.
  5. Add milk to the cup.
  6. Add sugar to the cup.
  7. Stir the tea.
  8. Drink the tea.

As you can see, there are certain steps that must be followed. These steps are in a specific order, even though some of the steps could be rearranged. For example, steps 5 and 6 can be reversed. You could add the sugar first, and the milk afterwards.

Please keep in mind that the order of some steps can probably be changed but you can’t move them far away from where they should be. For example, you can’t move step 3 (“Boil the water in the kettle.”) to the end of the algorithm, because you will end up drinking a cup of iced tea (and not a warm one) which is totally different from your initial goal!

This article is taken from a book of mine. If you enjoyed it, please visit my author's page inand check out all of my books!