← Asana Interview Insights

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

Senior
Jun 2026

Summary

Asana system design round, object-oriented focus. The question was about designing a jigsaw puzzle game from scratch which sounds almost fun until you're 20 minutes in and realize you haven't even defined how pieces match each other yet.

Questions Asked (2)

Q1

Design the object-oriented structure for a jigsaw puzzle game. Walk through the core classes, how pieces represent their four sides, how matching between pieces is determined, the data structure for the assembled board, and the key API methods.

System DesignData ModelingAPI & Integrations
Author's notes

I started with Piece and Puzzle and thought I was doing great, then the interviewer asked how I'd actually represent a tab vs a blank on an edge and I kind of froze.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and scope, then outline the core classes and their relationships. Focus on how pieces represent their sides and how matching is determined, and describe the board data structure and key API methods. Emphasize extensibility and performance considerations.

Pro tip: Demonstrate awareness of edge cases like border pieces and rotation, and discuss how your design supports features like hints or undo. This shows you think beyond the basic puzzle.

1. Clarify Requirements and Scope

Ask questions to understand the puzzle size, whether pieces can rotate, if there are multiple players, and any performance constraints. This ensures your design meets the actual needs.

2. Define Core Classes and Relationships

Identify main classes: Puzzle, Piece, Side, Board, and possibly Player. Describe their responsibilities and how they interact, using composition and inheritance where appropriate.

3. Model Piece Sides and Matching Logic

Explain how each piece has four sides, each with a type (e.g., flat, tab, blank) and an identifier. Describe how matching is determined by comparing side types and identifiers, and how rotation affects matching.

4. Design Board Data Structure and Placement

Propose a 2D grid or hash map to represent the assembled board, storing piece references. Discuss how to handle empty slots and validate placements.

5. Outline Key API Methods

List essential methods like placePiece(piece, position), removePiece(position), getPieceAt(position), isComplete(), and findMatches(piece). Explain their signatures and behavior.

Key Points to Mention

  • Use of enums or constants for side types (e.g., FLAT, TAB, BLANK) and unique identifiers for matching.
  • Rotation handling: either store orientation in Piece or use a separate Side object that can be rotated.
  • Board representation: 2D array for fixed-size puzzles or sparse matrix for large puzzles.
  • Matching algorithm: compare adjacent sides' types and identifiers, considering rotation.
  • API design: methods should be intuitive, with clear parameters and return types.
  • Extensibility: allow for different puzzle shapes, sizes, and additional features like hints or undo.

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

Q2

How would you extend this design to support non-rectangular or arbitrary puzzle shapes, a hint or auto-solve feature, and multi-player collaborative solving?

System DesignTechnical Trade-offsAdaptability & Ambiguity
Author's notes

This came as a follow-up and I was still mentally stuck on the base design.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the current design's assumptions and the new requirements, then propose a modular architecture that separates puzzle representation, solving logic, and collaboration layer. For each extension, discuss data model changes, algorithmic considerations, and trade-offs, emphasizing how to maintain backward compatibility and scalability.

Pro tip: Frame your answer around extensibility and separation of concerns, showing how each feature can be added without disrupting existing functionality. Mention that you'd validate assumptions with stakeholders and iterate based on user feedback, demonstrating product thinking.

1. Clarify Requirements and Constraints

Ask questions to understand the expected scale, performance needs, and user experience for each feature. Identify what 'non-rectangular' means (e.g., irregular polygons, holes) and the desired level of collaboration (real-time vs. asynchronous).

2. Redesign Puzzle Representation

Propose a flexible data model, such as a graph or grid with arbitrary cell shapes, to support non-rectangular puzzles. Discuss how to adapt existing algorithms (e.g., constraint propagation) to this representation.

3. Implement Hint and Auto-Solve Features

Outline a hint system that uses the solver's state to suggest next steps, and an auto-solve that leverages backtracking or constraint satisfaction. Consider performance optimizations like caching and incremental solving.

4. Enable Multi-Player Collaboration

Design a real-time collaboration layer using WebSockets or CRDTs to sync puzzle state across clients. Address conflict resolution, presence, and offline support, ensuring consistency and low latency.

5. Evaluate Trade-offs and Scalability

Discuss trade-offs between generality and performance, and how to scale the collaboration backend. Propose monitoring and testing strategies to ensure reliability.

Key Points to Mention

  • Use of graph-based or cell-based data structures to represent arbitrary shapes
  • Adapting constraint satisfaction algorithms (e.g., backtracking, SAT solvers) for non-rectangular grids
  • Hint generation via solver state analysis and heuristics
  • Auto-solve with performance optimizations like memoization and parallelization
  • Real-time collaboration using WebSockets, CRDTs, or OT for conflict resolution
  • Scalability considerations: sharding, load balancing, and eventual consistency

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