Design Add, Overwrite, Undo, and Redo for Billing State

Quick Overview

Design billing-state commands that progress from additive updates to absolute overwrites and reversible history. The answer defines before-and-after command records, undo and redo stacks, branch invalidation, fixed-precision money, persistent audit events, optimistic concurrency, idempotency, complexity, and edge-case tests.

Design Add, Overwrite, Undo, and Redo for Billing State

Company: Reddit

Role: Software Engineer

Category: Software Engineering Fundamentals

Difficulty: hard

Interview Round: Technical Screen

Overview: Design billing-state commands that progress from additive updates to absolute overwrites and reversible history. The answer defines before-and-after command records, undo and redo stacks, branch invalidation, fixed-precision money, persistent audit events, optimistic concurrency, idempotency, complexity, and edge-case tests.

Reddit logo
Reddit
Sep 4, 2026
hardSoftware EngineerTechnical ScreenSoftware Engineering Fundamentals
14
0
Loading...