Enter numbers 1–N in each cell of the N×N grid (or click Random to generate a sample). Then click Solve. The solver will shade the correct cells black.
The solver first applies constraint propagation — unique cells (where a value appears only once in its row or column) can never be shaded. Adjacent cells to already-shaded cells cannot be shaded. Then it uses backtracking to resolve any remaining ambiguity, always checking that unshaded cells stay connected.
Three rules: no shaded cell is adjacent to another shaded cell; no unshaded number appears twice in any row or column; all unshaded cells form one connected group.