Two Sigma·Software Engineer·Onsite - System Design / Architecture
Jun 2026
Two Sigma system design round, focused entirely on a vending machine OOP problem. Way more depth required than I expected, the interviewer cared a lot about both the domain model and the test coverage, not just the high-level diagram.
- Design a vending machine using object-oriented principles. Walk through the core domain model, the user-facing API, an explicit state machine, and relevant design patterns.
- How would you write unit tests for this vending machine? Cover happy-path purchases, exact change, insufficient funds, sold-out items, cancel/refund, and concurrent purchases.
“I started with the obvious classes (Item, Slot, VendingMachine) and felt pretty good until they pushed on the state machine.” The rest of the author's notes on Software Engineer interview at Two Sigma, Onsite - System Design / Architecture round, covers how they worked through the question, what the panel pushed back on, and what they would do differently.
View Post