InterviewDB Question

Supermarket Queue: Simulate and Optimize a Multi-Checkout Queue System

Question Details

Problem Simulate a supermarket with k checkout lanes. Customers arrive at given times with a number of items. Each item takes 1 unit of time to scan; no setup time between customers. Each customer joins the lane with the fewest customers currently in it (ties broken by lane index). Return the time each customer finishes checking out. Example Follow-ups What is the time complexity of your solution? How does it change with k and n? How would you extend this to model express lanes (items < 10) and…

Full Details

🔒

Unlock all Jane Street questions

Full insider details, leaked discussions, and candidate experiences.

Get full access — $100 a year, unlimited access

About This Question

This is a reported interview question from a jane street interview during the phone round.

It covers the following topics: Coding, Phone, Queue .