AlgoViz

Design a Flash Sale System

hard 55 min

Sell 10,000 units when 10 million people come at the same second.

Where it shows up

The same pattern appears across everyday software.

  • Timed deals in shops

    Short offers on marketplaces such as Amazon's Lightning Deals, each with a limited quantity.

  • Shopping festivals

    Alibaba's Singles' Day and Flipkart's Big Billion Days: thousands of small flash sales at once.

  • New phones and consoles

    Equal units, one per person, strong interest from resellers.

  • Limited clothing

    A few sizes, each with its own stock row. The whole page is the crowd.

  • Public appointments

    Vaccine slots or exam places. Fairness matters more than money.

  • Course registration

    Places in a class at eight o'clock. The same queue and the same hold.