What Is an Algorithm? Definition and Characteristics of a Good Algorithm

You follow algorithms every day – a recipe for coconut bake, the steps to top up your phone credit, or directions to a friend’s house. In this post we look at what an algorithm is and the characteristics every good algorithm must have.

Build on what you learned in Forms 1–3

These Lower School ICT posts cover the basics of this topic:

In this post:

  • Definition of an algorithm
  • Characteristics of a good algorithm
  • Good vs bad algorithm examples
  • Ways of representing an algorithm

Video: Computer Science Basics: Algorithms – https://www.youtube.com/watch?v=kM9ASKAni_s

What is an algorithm?

An algorithm is a finite sequence of clear, step-by-step instructions for solving a problem or completing a task. A computer program is an algorithm written in a programming language so that a computer can follow it.

Characteristics of a good algorithm

The CSEC syllabus expects you to know that an algorithm:

  • has a finite number of steps – it does not go on forever;
  • is precise – each step is exact (e.g. “add 2 cups of flour”, not “add some flour”);
  • is unambiguous – each step has only one meaning, so everyone following it does the same thing;
  • has a flow of control from one process to another – the steps happen in a clear order; and
  • terminates – it comes to an end and produces a result.

Good and bad examples

Not a good algorithm stepWhyBetter version
Add sugar to tasteNot precise – how much?Add 2 tablespoons of sugar
Keep stirringNever ends – not finiteStir for 3 minutes
Turn at the big treeAmbiguous – which tree? which way?Turn left at the mango tree opposite the church

Example: topping up phone credit

  1. Start
  2. Dial the top-up code
  3. Enter the 16-digit voucher number
  4. Press Send
  5. Read the confirmation message
  6. Stop

This algorithm is finite (6 steps), precise, unambiguous, flows from one step to the next and terminates.

Ways of representing algorithms

Algorithms can be written as narrative (plain sentences), pseudocode (structured English-like statements) or as a flowchart (a diagram). CSEC focuses on pseudocode and flowcharts – see the next post and the earlier post Ways of representing algorithms.

Optional extension: famous algorithms such as sorting and finding the shortest route – the idea behind map apps.

Video: Intro to Algorithms: Crash Course Computer Science #13 – https://www.youtube.com/watch?v=rL8X2mlNHPM

Try it: Which characteristic is missing?

Each instruction breaks one characteristic of a good algorithm. Choose which one.

“Repeat forever: wipe the table”
“Pour in a little milk”
“Go to the shop by the school” (there are two schools nearby)
Steps are jumbled with no clear order

Related

Related:
• WHAT IS AN ALGORITHM? – DEFINITION
• Algorithms
• The purpose of an algorithm

Paper 1 practice (multiple choice)

Choose the best answer for each question. Try them all before you check.

1. An algorithm is BEST defined as
(A) a computer program in machine code
(B) a finite set of step-by-step instructions to solve a problem
(C) a diagram of computer hardware
(D) a programming language

2. “Bake until it looks nice” is NOT a good algorithm step because it is not
(A) finite
(B) precise
(C) a flowchart
(D) a program

3. Which characteristic means an algorithm must eventually stop?
(A) Unambiguous
(B) Terminates
(C) Precise
(D) Flow of control

4. Which is NOT a way of representing an algorithm?
(A) Pseudocode
(B) Flowchart
(C) Narrative
(D) Compiler

5. Each instruction in an algorithm should have only one meaning. This is called being
(A) finite
(B) unambiguous
(C) efficient
(D) terminated

Show answers

1. B
2. B
3. B
4. D
5. B

Paper 2 practice (structured question)

Shania writes these instructions for her younger brother to make a cup of cocoa tea: “Boil some water. Put cocoa in the cup. Add the water. Stir for a while. Add sugar if you want.”

(a) Define the term “algorithm”. (2 marks)

(b) State THREE characteristics of a good algorithm. (3 marks)

(c) Identify TWO steps in Shania’s instructions that are not precise and rewrite EACH so that it is precise. (4 marks)

(d) Name ONE way, other than narrative, to represent an algorithm. (1 mark)

Total: 10 marks

Show answers

(a) A finite sequence of step-by-step instructions (1 mark) for solving a problem or completing a task (1 mark).

(b) Any three (1 mark each):
• finite number of steps
• precise
• unambiguous
• flow of control from one process to another
• terminates

(c) Any two steps identified (1 mark each) with a precise rewrite (1 mark each), e.g.
• “Boil some water” → “Boil 1 cup of water”
• “Stir for a while” → “Stir for 30 seconds”
• “Put cocoa in the cup” → “Put 2 teaspoons of cocoa in the cup”

(d) Pseudocode OR flowchart (1 mark).

Next: Flowcharts and Pseudocode: Sequence, Selection and Loops

Syllabus link: This post is relevant to the CSEC® Information Technology Syllabus (CXC 30/G/SYLL 17), Section 7: Problem-Solving and Program Design, Specific Objective 5 (“explain the concept of algorithms”).

Attributions to media used in this post:

No third-party images are used in this post. Embedded videos are credited on YouTube to their channels.

© 2026 Vedesh Kungebeharry. All rights reserved.

Leave a Reply