Review checkout code for defects and privacy
Company: Dropbox
Role: Data Scientist
Category: Coding & Algorithms
Difficulty: medium
Interview Round: Technical Screen
You are reviewing a supermarket checkout implementation. Identify and prioritize issues and fixes across: (a) monetary correctness (avoid floating point; tax/discount rounding rules; coupon stacking; price overrides; refunds/voids; currency/locale/time-zone edge cases), (b) transactional integrity (idempotent payments, exactly-once order creation, inventory race conditions, TOCTOU on discounts), (c) security/privacy (PCI scope reduction, tokenization, PII redaction in logs, least-privilege DB access, input validation to prevent injection), and (d) resilience/observability (retry/backoff, dead-letter queues, audit trails). Propose concrete refactors, unit/integration tests, and a minimal threat model. Provide a short code review checklist you would use in 30 minutes and 3 high-risk bugs you would hunt first.
Overview: This question evaluates a candidate's ability to audit a supermarket checkout implementation for monetary correctness, transactional integrity, security and privacy, and resilience, assessing competencies in precise financial handling, concurrency and idempotency, threat modeling, logging and redaction, and observability.
Read the full Dropbox Data Scientist interview experience this question came from