Algorithm Visualizations

Algorithm Visualizations

Explore algorithm visualizations code snippets and tutorials

Algorithm Visualizations

Lower bound: Examples & Code

Lower bound: Find the first position whose value is at least the target. Input is sorted first. Explore a worked example, complexity and tested code.

Algorithm Visualizations

Catalan numbers: Examples & Code

Catalan numbers: Use the recurrence C(n) = Σ C(i)C(n−1−i), with C(0)=1. Explore a worked example, complexity and tested code.

Algorithm Visualizations

Divisor enumeration: Examples & Code

Divisor enumeration: Test every candidate divisor in ascending order. Explore a worked example, complexity and tested code.

Algorithm Visualizations

Euler totient: Examples & Code

Euler totient: Remove each distinct prime factor from the count using φ(n) = n ∏(1−1/p). Explore a worked example, complexity and tested code.

Algorithm Visualizations

Binary GCD (Stein): Examples & Code

Binary GCD (Stein): Remove common powers of two, then repeatedly subtract odd values. Explore a worked example, complexity and tested code.