Review checkout code for defects and privacy

Read the full interview experience this question came from →

Quick 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.

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

|Home/Coding & Algorithms/Dropbox
Dropbox logo
Dropbox
Oct 13, 2025
mediumData ScientistTechnical ScreenCoding & Algorithms
5
0

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.

Submit Your Answer to Earn 20XP

Sign in to leave a comment

Loading comments...