Design a library management system
The interviewer asks you to design the software behind a library's front desk. Picture the desk itself: a shelf of returned books, a list of names for each popular title, and a hold shelf where a reserved book waits with one name on its paper slip.
The closest other case study is the parking lot, which also hands out a scarce thing and takes it back. Interviewers like the library because everyone knows it, and because one title has many copies. A copy's state and a reservation's order are two different things, and candidates often mix them up.
Below is a full 45-minute round on the LLD framework. At each Guess before you read on, stop and answer first. The full runnable project is a download 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.
Step 1 · Clarify the requirements and cut the scope
Minutes 0–5 · How this step works
Interviewer: Design a library management system.
You: What can a member do?
Interviewer: Search by title or author, borrow, return, and reserve a title when no copy is free.
You: Can the library hold several copies of one title?
Interviewer: Yes, and each copy has its own barcode.
You: What are the loan rules, and do I take the payment?
Interviewer: Five books at a time, for 14 days. A late book costs 25 cents a day, every day started counts, and the most anyone pays is $10. Just return the amount.
You: What happens when a reserved book comes back?
Interviewer: It is held for the first person for 3 days, and they are told. If they don't come, it goes to the next person.
You: Then I'll build search, borrow, giveBack, reserve and the fine. Payments, renewals and several branches are out. OK?
Interviewer: Good.