Guided lesson

Sorting Basics

Problem Solving

Sorting Basics

Core

Mental model

  • Comparison sorting is often O(n log n).

Operations

compare

Cost shape

Usually O(n log n), simple sorts O(n^2)

Watch out

Sorting when original order matters.

Related algorithms

Insertion SortMerge SortQuick Sort
Guided progression
10% lesson
Step 1 / 2Learner goal
Speech settings Speed 1.0 · Volume 90%

Keyboard: Space play/pause · Arrow keys step · Page Up/Down change sections · R restart