You’ve heard this before.
“Sir, table will be ready in 5 minutes.”
You smile.
You wait.
10 minutes.
20 minutes.
45 minutes later…
Host says:
Almost ready.
Still almost ready. 💀
So I turned this into a coding challenge.
And surprisingly…
This is a real system design problem.
🍽️ The Problem
The logic looks simple:
Add guests to a waitlist
Assign tables
Update status
Done.
Seems straightforward.
But real restaurants are chaos.
⚠️ What Goes Wrong?
In real systems:
• Tables take longer than expected
• Guests stay longer than predicted
• Wait estimates become wrong
• Queue order may not be fair
• Some people feel stuck forever
And suddenly:
👉 “5 minute wait” becomes 50 minutes.
Sound familiar?…