Lessons
C++ · Algorithm Techniques · 43. Backtracking

step 1 of 7

Every path, one by one

Backtracking tries every possibility. At each step I pick 0, go on, then come back and pick 1.

Like a maze: walk a path, come back, try the next.

Mission

Make me build codes 3 long. How many come out?

PIP·1
main.cppyour code
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
← press me!
readyscreen

Press RUN to see what this program does.

Do the mission and Next turns green.

Backtracking