← Questions

Cart with nested transactions

0
DecagonCodingLast asked Jul 2026

A coding interview question asked in Decagon's technical phone screen, last asked Jul 2026. It tests transactions, nesting and design.

Extend an in-memory shopping cart with transactions that can nest. Inside a transaction every change is visible right away, but it only becomes permanent when the outermost transaction commits.

Sign in to unlock this question

The full prompt, the worked answer and your own canvas or code with the AI tutor. New accounts get 5 credits: each one unlocks a question for good.

Where it's asked

What it tests

transactions · nesting · design

Your code and the AI tutor open when you unlock this question.