Skyscrapers

Every row and column holds building heights 1..n exactly once. Each edge number counts the buildings visible from that side — taller buildings hide everything shorter behind them. Click a cell to cycle its height.

The solver models each cell as a candidate bitmask over heights 1..n. A staircase rule opens: a clue c caps the cell k steps into its line at n − c + 1 + k (a taller building there leaves too few slots in front to reach c visibles), and a clue of 1 pins the nearest cell to n. The star is exact line projection: a line of a Latin square is a permutation, so it has at most n! completions — not nn. The solver enumerates the permutations consistent with the current masks, keeps those whose running-maxima counts match both end clues, and intersects each cell with the union of the survivors — the tightest conclusion any line-local reasoning can reach, which quietly subsumes hidden singles, naked pairs, and every classic single-line pattern. Rows constrain columns and back, so the projections are run to a fixpoint; when they stall, a fewest-candidates search branches, re-propagates, and counts solutions — the bundled boards are authored as their own solved skylines, thinned until every remaining clue is load-bearing, and the test suite proves each has exactly one answer.