← Questions

Shopping cart with discounts, undo and redo

0
DecagonCodingLast asked Sep 2026

A coding interview question asked in Decagon's pair coding round, last asked Sep 2026. It tests oop, undo and design.

Build a shopping cart where every change can be undone and redone, one step at a time, like an editor. The cart holds items with quantities, an item can carry a percentage discount, and the cart reports its total.

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

  • Decagon · Pair coding · Last asked Sep 202660 min · Build a small working feature with the interviewer as a teammate

What it tests

oop · undo · design

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