What this combinatorial seating puzzle tests
This is a hard combinatorial puzzle that rewards careful problem setup and systematic enumeration. It appears in quant interview loops as a test of whether you can translate a real-world constraint—in this case, the requirement that a group of people be able to leave without disturbing others—into a precise mathematical condition.
The core challenge is identifying which configurations of five seats satisfy the "shy" constraint: the friends must form a contiguous block that has direct access to an aisle or wall. This requires you to map out the geometry of the seating arrangement, understand the topology of connectivity, and count valid placements across multiple regions. The problem rewards both logical clarity and methodical case analysis.
- Graph connectivity and adjacency constraints
- Systematic case breakdown by seat block and aisle position
- Careful handling of boundary conditions (walls and aisles)