AAlgorithm LabFree forever

Foundations

A plain-language algorithm glossary.

Keep this reference nearby while you learn. Every definition includes a concrete example, without assuming a computer-science background.

01

Algorithm

A finite sequence of steps used to solve a problem or complete a computation.

Example: Bubble Sort is an algorithm for ordering values.
02

Big O notation

A way to describe how an algorithm's resource use grows as its input grows.

Example: O(n²) means the work can grow roughly with the square of the input size.
03

Time complexity

How the number of operations grows as the input becomes larger.

Example: Binary Search has O(log n) time complexity.
04

Space complexity

How much additional memory an algorithm needs as the input grows.

Example: An in-place swap can use O(1) extra space.
05

Stable sort

A sorting algorithm that preserves the original order of items with equal keys.

Example: If 4A appears before 4B, a stable sort keeps 4A first.
06

In-place

An algorithm that transforms its input using only a small, constant amount of extra memory.

Example: Bubble Sort swaps values inside the same array.
07

Recursion

A technique where a function solves a problem by calling itself on a smaller version of that problem.

Example: Tree traversal is often expressed recursively.
08

Memoization

Saving previously computed answers so repeated subproblems do not need to be solved again.

Example: Memoization turns naive recursive Fibonacci into a linear-time solution.
09

Vertex and edge

A vertex is a point in a graph; an edge represents a connection between two points.

Example: Cities can be vertices and roads can be edges.
10

Greedy choice

A locally optimal decision made without revisiting earlier choices.

Example: Kruskal's algorithm repeatedly chooses the cheapest safe edge.

Ready to see these ideas in motion?

Open Bubble Sort →