Problem set: bookings and commerce (car rental, hotel booking, a coupon and discount engine, a shopping cart with checkout)
These four questions come from shops and booking desks: cars rented at branches, hotel rooms sold by the night, coupons at checkout, and a cart that pays through a slow card company. Three of them sell something scarce, a car, a room for a night or the last lamp, and the fourth decides what the shopper pays. No case study covers them, but each builds on one you have read and combines two or three patterns you know. Find which ones apply, then spend your minutes on what each system does differently.
How to use this page. Give each problem 45 minutes on a timer, on the clock of the LLD round. Clarify by minute 5, find the entities by 9, draw the class diagram by 15 and write the signatures by 20. Have the core code running by 30, and leave the rest until 43 for deep dives. Talk out loud and follow the six steps, on paper or in an editor. Open the first hint once your scope and entities are done, and the second when you reach the hard part and get stuck. Then open Check your answer, compare your class diagram and code with it, and read "A strong answer covers" as the interviewer's notes. You can also build a problem in a 90-minute machine-coding round with the 90-minute plan, then compare your code with the download. The download is a strong submission, except for the command reader that a real round adds (the driver).
The download holds all four problems in Java, JavaScript and Python.
Run the full project
This design as a project you can run, with its tests and a demo. You only need Java 21, Node 24 or Python 3.13. The README says how to run it.