Algorithm Visualizations

Algorithm Visualizations

Explore algorithm visualizations code snippets and tutorials

Algorithm Visualizations

N-Queens: Examples & Code

N-Queens: Place one queen per row; undo placements that block later rows. Stops at the first solution. Explore a worked example, complexity and tested code.

Algorithm Visualizations

Naive string matching: Examples & Code

Naive string matching: Try the pattern at every possible starting position. Explore a worked example, complexity and tested code.

Algorithm Visualizations

Activity selection: Examples & Code

Activity selection: Select the earliest finishing compatible activity. Explore a worked example, complexity and tested code.

Algorithm Visualizations

Sieve of Eratosthenes: Examples & Code

Sieve of Eratosthenes: Mark multiples of each prime; unmarked values are prime. Explore a worked example, complexity and tested code.