AlgoScope

Brute Force

ParadigmbeginnerParadigms

Try every candidate; correct by construction, the baseline to beat.

Decision · step 2 of 17Brute Force: Found near the end
80311526311445ij

The search space is every pair (i, j) with i before j. That is the whole cost of brute force: the size of the space, since each candidate is checked in constant time.

Open in the player →or start at step 2

What you will see

Every candidate is checked in order; the counter is the whole search space.

How brute force works →

Cost

SpaceO(1)

How you work with it here

play it through, step one change at a time, compare two runs.

Screen readers: Each paradigm lesson is narrated as the characteristic loop it performs; the comparison view is available as a table.

Reduced motion: Side-by-side panes update in place.