← Asana Interview Insights

Asana·Software Engineer·Technical Phone Screen·Intermediate

Intermediate
Jun 2026

Summary

Asana software engineer interview with three back-to-back technical questions: code reading with complexity analysis, then two object-oriented design problems. The OOD problems were heavier than I expected and felt more like mini system design than classic coding.

Questions Asked (3)

Q1

You're given two short code snippets. Explain what each one does in plain English, then analyze the time and space complexity of both.

Algorithms & Data StructuresTechnical Trade-offs
Author's notes

This part felt manageable but I fumbled a bit on stating assumptions out loud.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by restating each snippet in plain English, focusing on its purpose and behavior. Then systematically analyze time and space complexity for each, explaining your reasoning and considering best, average, and worst cases. Finally, compare the two snippets and discuss trade-offs.

Pro tip: Always clarify assumptions about input size and constraints before diving into complexity analysis, and mention that constant factors matter in practice even if Big-O ignores them.

1. Understand and Restate

Read each snippet carefully and restate its functionality in simple, non-technical terms. Identify inputs, outputs, and core operations.

2. Analyze Time Complexity

Determine how the number of operations grows with input size. Consider loops, recursion, and built-in functions; specify best, average, and worst cases if they differ.

3. Analyze Space Complexity

Assess additional memory used beyond the input, including variables, data structures, and call stack. Distinguish between auxiliary space and total space.

4. Compare and Discuss Trade-offs

Highlight key differences between the two snippets in terms of efficiency, readability, and practical use. Mention scenarios where one might be preferred.

5. Summarize and Conclude

Provide a concise summary of your findings, reiterating the complexities and any important caveats or assumptions.

Key Points to Mention

  • Big-O notation and how to derive it from code structure
  • Distinction between time and space complexity, including auxiliary space
  • Best, average, and worst-case analysis
  • Impact of input size and constraints on complexity
  • Trade-offs between different algorithmic approaches (e.g., time vs. space)
  • Practical considerations like constant factors and readability

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

Q2

Design the core classes and APIs for a jigsaw puzzle application. Pieces can be rotated, each piece has four sides that must match neighbors, and the board needs to support placing, removing, and validating placements.

System DesignData ModelingTechnical Trade-offs
Author's notes

I went straight to modeling a Piece class with four edges and a rotation state, then a Board class holding a 2D grid.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and constraints, then define the core domain model (Piece, Side, Board) with clear responsibilities and interfaces. Focus on the placement validation algorithm and rotation handling, and discuss trade-offs between simplicity and extensibility.

Pro tip: Emphasize the importance of separating the puzzle's logical model from its rendering, and propose an efficient validation strategy that checks only affected neighbors rather than the entire board.

1. Clarify Requirements and Constraints

Ask about puzzle size, piece representation, rotation mechanics, and whether the board is fixed or dynamic. Clarify if pieces can be placed anywhere or only in valid positions.

2. Define Core Domain Model

Identify key entities: Piece, Side, Board, and possibly Position. Define their attributes and relationships, such as Piece having four Sides with edge types, and Board managing a grid of placed pieces.

3. Design APIs for Placement and Validation

Specify methods like placePiece(piece, position, rotation), removePiece(position), and validatePlacement(piece, position, rotation). Discuss return types and error handling.

4. Implement Validation Logic

Detail how to check compatibility with adjacent pieces: compare side types (e.g., tab, blank, flat) after accounting for rotation. Consider edge cases like borders and empty neighbors.

5. Discuss Trade-offs and Extensibility

Talk about trade-offs: in-memory vs. persistent storage, simple grid vs. sparse representation, and how to extend for different puzzle shapes or additional constraints.

Key Points to Mention

  • Representation of piece sides and rotation (e.g., enum for edge types, rotation as 0/90/180/270 degrees)
  • Board data structure: 2D array or hash map for sparse placement
  • Validation algorithm: check only adjacent pieces, handle borders and empty slots
  • API design: clear separation of concerns, idempotency, and error handling
  • Trade-offs: performance vs. simplicity, memory usage, and scalability
  • Extensibility: supporting different puzzle shapes, additional constraints, or undo/redo

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

Q3

Design the core logic and data model for the 2048 game, including how a move is processed, tile merging, spawning new tiles, score tracking, and game-over detection.

Algorithms & Data StructuresSystem DesignData Modeling
Author's notes

Probably the question I felt best about.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and constraints, then propose a clean data model (e.g., 4x4 grid, tile values as powers of 2, score). Walk through the move algorithm step-by-step, covering slide, merge, spawn, and game-over detection, while discussing time/space complexity and edge cases.

Pro tip: Emphasize that you separate the core game logic from the UI/rendering, making it testable and extensible; mention that you'd write unit tests for each move direction and merge scenario.

1. Clarify requirements and constraints

Ask about board size, win condition (2048 tile), spawn probability (90% 2, 10% 4), and whether moves that don't change the board are allowed. Confirm that the game is single-player and turn-based.

2. Define the data model

Represent the board as a 4x4 matrix (2D array) of integers, where 0 represents an empty cell and other values are powers of 2. Track the current score and game state (ongoing, won, lost).

3. Design the move algorithm

For a given direction, extract each row/column in the direction of movement, slide non-zero tiles to one side, merge adjacent equal tiles (only once per tile per move), and update the score. Then place the resulting tiles back into the board.

4. Handle tile spawning and game-over detection

After a successful move (board changed), spawn a new tile (2 or 4) in a random empty cell. Check for game over: no empty cells and no adjacent equal tiles. Also check for win if a 2048 tile is created.

5. Discuss complexity and optimizations

Analyze time complexity: O(n^2) per move for an n x n board, which is O(1) for fixed 4x4. Mention potential optimizations like bitboards or precomputed move tables for larger boards, and how to make the code testable.

Key Points to Mention

  • Use a 2D array (or list of lists) for the board, with 0 for empty cells and powers of 2 for tile values.
  • Merge logic: slide all tiles in the direction, then merge adjacent equal tiles from the direction of movement, ensuring each tile merges only once per move.
  • Score update: add the value of the merged tile (e.g., merging two 2s gives 4, so add 4 to score).
  • Spawn new tile: after a move that changes the board, randomly pick an empty cell and place a 2 (90% chance) or 4 (10% chance).
  • Game-over detection: board is full and no adjacent tiles are equal (horizontally or vertically).
  • Win condition: a tile with value 2048 is created; game can continue or end based on requirements.

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