Stack 003

The explicit stack machine. Every individual push and pop is one numbered operation on a single LIFO stack. Clue 1's five candidates push in order as ops 1–5 (so #1 = house 1); being a LIFO, the top (house 5) pops first at op 6 and is cross-checked against every other clue. Drop on a violation; otherwise expand the next clue and push its candidates. A popped frame at depth 14 is the answer. See also Stack 001 and Stack 002.

Operation 0 stack size 0
0 / 0

 

The stack — top of LIFO at the top

    Board — the popped frame's arrangement

    A1…E5 string:

    Operation log

    Each line carries the cumulative board as houses A1…E5 — the house digit 1–5 each cell occupies, · if unset (same layout as the solution string). At depth 14 it equals 34215 35412 52341 31245 43125.