BeginnerTopic 2 of 104Software & Computing

Algorithms

Step-by-step procedures to solve problems with defined inputs and outputs.

In depth

An algorithm is a finite, unambiguous sequence of steps that solves a problem. Good algorithms are correct, efficient in time and memory, and clearly specified. They are described with pseudocode or flowcharts before being coded.

Key points

  • Finiteness and definiteness
  • Correctness proofs by invariants
  • Efficiency measured by Big-O
Example

Euclid's algorithm finds the greatest common divisor in a few steps.

Why it matters

Algorithms are the core of problem solving in computing, so a clear procedure is needed before any code can be correct or efficient.

Where this is used

  • Finding the shortest route between two bus stops.
  • Sorting a list of test results by score.
  • Deciding whether a password matches a stored hash.

Frequently asked questions

What is Algorithms?

Step-by-step procedures to solve problems with defined inputs and outputs.

Why is it important to understand algorithms?

Algorithms are the core of problem solving in computing, so a clear procedure is needed before any code can be correct or efficient.

What makes a good algorithm?

It is correct for all valid inputs, terminates, uses a reasonable amount of time and memory, and is easy to understand and maintain.

Can one problem have several algorithms?

Yes. Different algorithms trade speed, memory and simplicity, so the right one depends on the input size and constraints.

How is Algorithms used in practice?

Typical applications include finding the shortest route between two bus stops, sorting a list of test results by score and deciding whether a password matches a stored hash.

What should I learn before Algorithms?

Study "What is a program" first (topic 1 of 104 in Software & Computing). It covers the groundwork this topic builds on.

What are the key points of Algorithms?

Finiteness and definiteness. Correctness proofs by invariants. Efficiency measured by Big-O.

Can you give an example of Algorithms?

Euclid's algorithm finds the greatest common divisor in a few steps.

What comes after Algorithms?

The next topic is "Variables and data types", which builds directly on this one.

How difficult is Algorithms?

It is classed as Beginner in Software & Computing (topic 2 of 104). It is an entry-level topic. It relies only on basic school mathematics and the ideas introduced earlier in this discipline.

Learning path

Want to practise? Open the interactive course for quick checks, quizzes, simulations and progress tracking.

Related topics