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: