PracHub
QuestionsPremiumCoachesLearningGuidesInterview Prep
|Home/Software Engineering Fundamentals/Asana

Design a jigsaw puzzle (OOD)

Last updated: Mar 29, 2026

Quick Overview

This question evaluates object-oriented design skills, including class and relationship modeling, state and behavior encapsulation, validation logic, and handling piece rotation and side-matching constraints in a puzzle domain.

  • medium
  • Asana
  • Software Engineering Fundamentals
  • Software Engineer

Design a jigsaw puzzle (OOD)

Company: Asana

Role: Software Engineer

Category: Software Engineering Fundamentals

Difficulty: medium

Interview Round: Technical Screen

## Object-Oriented Design: Jigsaw Puzzle Design an object-oriented model for a **jigsaw puzzle game**. ### Requirements - The puzzle consists of a set of **pieces** that can be assembled into a final **board** (e.g., an `R x C` grid). - Each piece has **4 sides** (top/right/bottom/left) that must match adjacent pieces when placed. - Pieces can be **rotated** (0°, 90°, 180°, 270°). - The system should support: - Initializing a puzzle from a collection of pieces. - Placing/removing a piece on the board. - Validating whether a placement is legal (in-bounds, cell empty, and sides match neighbors). - Checking whether the puzzle is solved. ### Clarifications (state assumptions if needed) - You may assume a rectangular puzzle where each piece occupies one cell in a grid. - You may represent side “matching” using IDs/keys (e.g., `tab#42` matches `blank#42`) or a comparable abstraction. ### Deliverables - Propose core classes, key fields, and methods. - Explain how rotation affects side matching. - Discuss extensibility (e.g., different board shapes, irregular pieces, multiplayer, UI separation).

Quick Answer: This question evaluates object-oriented design skills, including class and relationship modeling, state and behavior encapsulation, validation logic, and handling piece rotation and side-matching constraints in a puzzle domain.

Related Interview Questions

  • Design a 2048 Game - Asana (medium)
  • Explain code complexity and design two games - Asana (medium)
  • Find frequent IPs from a huge file - Asana (medium)
Asana logo
Asana
Jan 22, 2026, 12:00 AM
Software Engineer
Technical Screen
Software Engineering Fundamentals
18
0
Loading...

Object-Oriented Design: Jigsaw Puzzle

Design an object-oriented model for a jigsaw puzzle game.

Requirements

  • The puzzle consists of a set of pieces that can be assembled into a final board (e.g., an R x C grid).
  • Each piece has 4 sides (top/right/bottom/left) that must match adjacent pieces when placed.
  • Pieces can be rotated (0°, 90°, 180°, 270°).
  • The system should support:
    • Initializing a puzzle from a collection of pieces.
    • Placing/removing a piece on the board.
    • Validating whether a placement is legal (in-bounds, cell empty, and sides match neighbors).
    • Checking whether the puzzle is solved.

Clarifications (state assumptions if needed)

  • You may assume a rectangular puzzle where each piece occupies one cell in a grid.
  • You may represent side “matching” using IDs/keys (e.g., tab#42 matches blank#42 ) or a comparable abstraction.

Deliverables

  • Propose core classes, key fields, and methods.
  • Explain how rotation affects side matching.
  • Discuss extensibility (e.g., different board shapes, irregular pieces, multiplayer, UI separation).

Solution

Show

Submit Your Answer to Earn 20XP

Sign in to leave a comment

Loading comments...

Browse More Questions

More Software Engineering Fundamentals•More Asana•More Software Engineer•Asana Software Engineer•Asana Software Engineering Fundamentals•Software Engineer Software Engineering Fundamentals
PracHub

Master your tech interviews with 8,000+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.