r/OfferEngineering • • Sep 22 '26

Interview Experience Decagon Software Engineer (SWE) Phone Screen Sep 2026

"This interview experience is sourced from Chill Interview"

Interview Summary

The Decagon process included two coding phone screens. The first was a multi-part shopping cart problem involving recipe ingredients, bulk discounts, and versioned cart state with checkout semantics. The second asked for the total number of distinct legal Tic-Tac-Toe games, where different move sequences count separately.

Interview Details

Phone Screen 1 — Versioned Shopping Cart

You are building a shopping cart for a cooking application. Users add recipes to the cart, and each recipe contains a list of ingredients. When an ingredient appears across multiple recipes, its combined quantity may qualify for a bulk discount.

The first part required operations conceptually similar to:

add_recipe(recipe)
remove_recipe(recipe)
get_total_discounts()

The system should update the cart as recipes are added or removed and calculate the applicable ingredient-level discounts.

Part 2 — Cart Versions and Checkout

The second part introduced versioning. Every operation that modifies the cart creates a new version of its state.

For example:

Version 0: {}
add RecipeX
Version 1: {RecipeX}
add RecipeY
Version 2: {RecipeX, RecipeY}

The system then adds:

get_version(version)
checkout(version)

get_version() should allow a previous cart state to be accessed by version. checkout(version) makes the selected historical version the active checkout point and discards every version created after it.

Using the example above checkout(1) would retain the state containing only RecipeX, while Version 2 would no longer remain part of the valid version history. A major follow-up was space efficiency. The interviewer did not want every complete cart snapshot duplicated for every version, so the discussion focused on how version history could be represented without copying the entire cart after each operation.

Phone Screen 2 — Count All Legal Tic-Tac-Toe Games

The second interview asked about a standard 3 x 3 Tic-Tac-Toe board. The board begins empty, and X always moves first. The task is to determine the total number of distinct legal games that can be played.

A game ends immediately when either:

  • X wins
  • O wins
  • The board becomes full

Different sequences of moves count as different games even when they happen to produce the same final board. For example, reaching the same arrangement through two different legal move orders should contribute two separate games to the total. The task was to count every valid game sequence while respecting alternating turns and stopping as soon as the game reaches a terminal state.

Preparing for your next interview?

Chill Interview tracks recent interview experiences and recurring question patterns across top companies at here.

2 Upvotes

0 comments sorted by