All challenges
Multiple ChoiceBeginner 45s

E-commerce oversell prevention approach

During flash sales, two orders can take the last item. Which design prevents oversell?
Options
  1. 1Check stock once at order time and then confirm the order asynchronously afterward
  2. 2Cache the stock counts in memory and trust the cache to stay accurate under load
  3. 3Let the warehouse staff reconcile any inventory mismatches after the sale completes
  4. 4Atomically reserve inventory with a conditional decrement before confirming the order

Think you can answer under pressure?

Get matched and answer live questions in 3-minute 1v1 battles. Elo ranking, badge tiers and bragging rights on the line.

Play this in a 3-minute battle