Three cells and the tallest grid
What this preview is
Three cells and the tallest grid is a hard quant interview question on puzzles.
- Difficulty
- Hard
- Topic
- Puzzles
- Discipline
- Quant trading
- Language
- Agnostic
- Companies
- 1
Solving this hard logic-puzzle grid problem
This is a hard constraint-satisfaction puzzle that combines elements of Sudoku-like placement rules with visibility logic. It tests your ability to reason about partial information, propagate constraints, and systematically eliminate impossible configurations under multiple overlapping conditions.
The core challenge is that each row and column must contain the values 1, 2, 3, 4 exactly once (a Latin square property), but with two cells marked invisible—meaning they satisfy the distinctness rule yet contribute nothing to the visibility counts from outside the grid. You must use the three visibility clues to narrow down which building heights must occupy specific cells, then work backward to determine the remaining entries. The visibility logic itself requires understanding that from any viewing direction, you can only see a building if it is taller than all buildings between it and the viewer.
- Latin square constraints and row/column uniqueness
- Visibility and occlusion logic
- Handling invisible (shaded) cells in constraint propagation
- Logical deduction and backtracking under tight clues