Shopping Cart with Undo and Redo for Add and Remove Operations
Company: Decagon
Role: Software Engineer
Category: Software Engineering Fundamentals
Difficulty: medium
Interview Round: Onsite
Overview: A coding exercise to build a shopping cart class whose add and remove operations can be undone and redone. It tests how history entries are represented, how capped removals and deleted lines are reversed exactly, what a new change does to the redo history, and how empty-history cases are handled.
Read the full Decagon Software Engineer interview experience this question came from