Basics Mind Map

Algorithm & Systems Visualizations

Every basics visualization on this site on one map. The branches are the main ideas. Each leaf is a page; the grey line under it is the one thing to remember about it. Click a branch to focus on it, click a page to open it.

Recall mode hides the page names. Read the hint, say the name, then click the "?" to check.

1. How the map is organized

Overview of the basics mind map: Big-O, Stacks, Queues, Disjoint sets, Lists.
The map at a glance: 5 branches, 12 pages.

Ask what the page is about:

  • How fast is an algorithm? That is Big-O: count the steps as n grows.
  • Which item comes out next? The last one in is a stack; the first one in is a queue. Each is shown with an array and with a linked list.
  • Are two items in the same group? That is disjoint sets.

2. The structures side by side

BranchMain operationsTimeArray or linked list
Stackspush, pop, peekO(1)array: fixed size; list: grows freely
Queuesenqueue, dequeueO(1)array: circular; list: head and tail
Disjoint setsfind, unionnear O(1), α(n) amortizedparent array

3. Five facts to remember

  • Big-O keeps the fastest-growing term and drops constants: 3n² + 5n is O(n²).
  • A stack is last in, first out; a queue is first in, first out.
  • An array queue must wrap around (circular), or dequeues leave unused cells at the front.
  • A linked-list stack needs only a head pointer; a linked-list queue needs head and tail.
  • With union by rank and path compression, union-find runs in near-constant amortized time.

See all basics pages in the index, or the other mind maps.