PracHub
QuestionsPremiumCoachesLearningGuidesInterview Prep
|Home/Software Engineering Fundamentals/Asana

Explain code complexity and design two games

Last updated: Mar 29, 2026

Quick Overview

This multi-part question evaluates code comprehension and algorithmic complexity analysis alongside object-oriented design competencies for interactive applications, covering skills in analyzing time and space complexity, class modeling, API design, and state management.

  • medium
  • Asana
  • Software Engineering Fundamentals
  • Software Engineer

Explain code complexity and design two games

Company: Asana

Role: Software Engineer

Category: Software Engineering Fundamentals

Difficulty: medium

Interview Round: Technical Screen

You are given three independent interview prompts. 1) **Code comprehension & complexity** - Given two short code snippets (language-agnostic), explain in plain English what each snippet does. - Analyze **time complexity** and **space complexity** (Big-O). State any assumptions (e.g., input size, data structure costs). 2) **Object-oriented design: Jigsaw puzzle** Design the core classes and APIs for a jigsaw puzzle application. - Pieces can be rotated. - Each piece has 4 sides that must match adjacent pieces. - The board supports placing, removing, and validating placements. - Describe key classes, relationships, and important methods. You may include high-level pseudocode. 3) **Object-oriented design: 2048 game** Design the core logic and data model for the 2048 game. - 4x4 grid of tiles with values (2,4,8,...). - A move (up/down/left/right) slides tiles and merges equal adjacent tiles once per move. - After a valid move, spawn a new tile (usually 2 or sometimes 4) in an empty cell. - Track score and detect game-over. - Provide classes/data structures and the algorithm to process a move.

Quick Answer: This multi-part question evaluates code comprehension and algorithmic complexity analysis alongside object-oriented design competencies for interactive applications, covering skills in analyzing time and space complexity, class modeling, API design, and state management.

Related Interview Questions

  • Design a 2048 Game - Asana (medium)
  • Design a jigsaw puzzle (OOD) - Asana (medium)
  • Find frequent IPs from a huge file - Asana (medium)
Asana logo
Asana
Feb 8, 2026, 12:00 AM
Software Engineer
Technical Screen
Software Engineering Fundamentals
20
0

You are given three independent interview prompts.

  1. Code comprehension & complexity
  • Given two short code snippets (language-agnostic), explain in plain English what each snippet does.
  • Analyze time complexity and space complexity (Big-O). State any assumptions (e.g., input size, data structure costs).
  1. Object-oriented design: Jigsaw puzzle Design the core classes and APIs for a jigsaw puzzle application.
  • Pieces can be rotated.
  • Each piece has 4 sides that must match adjacent pieces.
  • The board supports placing, removing, and validating placements.
  • Describe key classes, relationships, and important methods. You may include high-level pseudocode.
  1. Object-oriented design: 2048 game Design the core logic and data model for the 2048 game.
  • 4x4 grid of tiles with values (2,4,8,...).
  • A move (up/down/left/right) slides tiles and merges equal adjacent tiles once per move.
  • After a valid move, spawn a new tile (usually 2 or sometimes 4) in an empty cell.
  • Track score and detect game-over.
  • Provide classes/data structures and the algorithm to process a move.

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.