← Airbnb Interview Insights

Airbnb·Software Engineer·Onsite - System Design / Architecture·Senior

SeniorPrefer not to say
Jun 2026

Summary

Airbnb system design round for a software engineer role. The question was a Connect Four style OOP design problem and it went deeper than I expected, covering extensibility and testing strategy on top of the core class design.

Questions Asked (1)

Q1

Design an object-oriented model for a turn-based, grid-based drop token board game similar to Connect Four, including class responsibilities, extensibility for different win conditions or board configurations, and a testing approach for win-checking and move validation.

System DesignTechnical Trade-offsData Modeling
Author's notes

I started with the obvious classes, Game, Board, Player, Move, and then they pushed me on how I'd make win conditions swappable.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the game rules and requirements, then outline a class hierarchy with clear responsibilities for Board, Player, Game, and WinCondition. Emphasize extensibility through interfaces and dependency injection, and describe a testing strategy using unit tests for win-checking and move validation.

Pro tip: Demonstrate maturity by discussing trade-offs between simplicity and extensibility, and mention how you would test edge cases like diagonal wins and full-board draws.

1. Clarify Requirements

Ask clarifying questions about board dimensions, win conditions, number of players, and any special rules to ensure the model meets the needs.

2. Define Core Classes

Identify main classes: Board (grid state), Player (token), Game (turn management), and MoveValidator (move legality). Assign clear responsibilities to each.

3. Design for Extensibility

Use interfaces for WinCondition and BoardConfiguration to allow different win rules (e.g., Connect N) and board sizes without modifying core logic.

4. Implement Win Checking

Describe algorithms for checking wins (e.g., directional checks from last move) and how to make them pluggable via the WinCondition interface.

5. Outline Testing Approach

Propose unit tests for move validation (valid/invalid moves) and win conditions (horizontal, vertical, diagonal, draw), including edge cases.

Key Points to Mention

  • Single Responsibility Principle: separate Board, Player, Game, and WinCondition classes.
  • Extensibility via interfaces (e.g., WinCondition, BoardConfiguration) and dependency injection.
  • Move validation: check column not full, correct player turn, game not over.
  • Win checking: efficient algorithm checking only around last move in all directions.
  • Testing: unit tests with mocked boards for win conditions and move validation.
  • Trade-offs: simplicity vs. extensibility, performance of win checking.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.