InterviewLegend

Design a Grocery Checkout System

Alex Chen40 min readUpdated

A grocery checkout is the software behind the till. It looks up what was scanned, works out the price after every deal and coupon, takes the money and prints the receipt. At Susquehanna it's one of the most commonly reported design prompts for software engineers. It shows up in the final-stage object-oriented round, which runs 45 to 60 minutes, and candidates from intern to senior describe getting some version of it.

This is a low-level design round, so there are no load balancers to draw. The interviewer starts from the overall shape and then pushes down into class structure and real code in a shared editor, usually C++ or Python. The coding section has the phone-screen version, a Premium question that prints a receipt, which fits in about 30 minutes. Here we build the onsite scope on top of it, adding weighed goods, a promotion engine, payments that can fail, lanes that share stock, and the inventory and profit extension.

The Susquehanna angle
SIG tends to grade this round the way it would review trading code. The firm builds its own low-latency trading systems, and a checkout raises the same kinds of problems at a small scale. Money has to be exact to the cent, and a finished sale can't be quietly edited later. The points reported for this prompt match that. Integer money and a FIFO cost history for stock come up. So does whether a checkout commits every product in the basket or none of them, and what happens when several lanes sell from the same inventory. Expect questions on payment retries that must not charge twice, and on sale records that never change once written. If you've seen how a trading system works out realized profit by matching sells against the earliest buys, the inventory half of this problem is the same calculation with bananas.

SusquehannaPremium lesson · System design round

The Susquehanna design, worked end to end.

  1. The API and data modelSystem design
  2. The design, drawn out3 diagrams
  3. 4 deep divesWith the tradeoffs
Get the Susquehanna questions

$49 a year · all 100 companies · cancel anytime

From 20,000+ candidate reports, forum threads behind logins and write-ups in Chinese.

Had your Susquehanna interview?Tell us what they asked. Reviewed before it goes in, never with your name.
Susquehanna interview guide

Know what Susquehanna asks before you walk in.

13 coding · 2 system design · 26 behavioral questions

Get Premium$49 a year · Cancel anytime
Or start freeNo card.

Get their questions first.

InterviewLegend is independent and not affiliated with or endorsed by any company it covers.