Worked LLD and machine-coding problems
- Parking Lot (SDE-1): Design a multi-floor parking lot that issues tickets, finds a free spot of the right size and charges a fee on exit. It is the most common first LLD question.
- Elevator System (SDE-2): Design the control software for a group of elevators in an office tower. Take calls, pick the best elevator, and move each car with a rule that is easy to swap.
- Vending Machine (SDE-1): Design a coin-operated vending machine whose behaviour depends on what has happened so far. It is the classic problem for the State pattern.
- LRU Cache (SDE-1): Build a fixed-size cache that removes the least recently used entry when full, with get and put in constant time. It is asked as both a coding and a design question.
- Rate Limiter (SDE-2): Design an in-process rate limiter that allows each client a fixed number of requests per time window. The algorithm can be swapped, and it stays correct under many threads.
- Logging Framework (SDE-1): Design a small logging library like Log4j, with levels, several output targets and pluggable formats. Logging must never slow down or crash the app.
- Splitwise: expense sharing (SDE-2): Design an expense-sharing app like Splitwise. Users add expenses split equally, by exact amounts or by percentage, see who owes whom, and settle with a short list of payments.
- Movie ticket booking (SDE-2): Design seat booking for a movie ticketing app like BookMyShow. Users pick seats, the app holds them for a few minutes during payment, and two users can never book the same seat.
- Snake and ladder game (SDE-1): The classic machine-coding round: build a working snake and ladder game with a board, dice, players and a game loop, and keep the rules easy to change.
- Library management system (SDE-1): Design a library system with members, books and their physical copies, loans with due dates, fines for late returns, and reservations for books that are all out.
- Shopping cart with stackable discounts (SDE-2): Design SwiftKart's cart and pricing: items, coupons and automatic offers that can stack in a fixed order, with exact rounding in paise and a clear price breakdown.
- Notification service (SDE-2): Design a service that sends SMS, email and push messages when events happen, respecting user preferences, filling templates, and retrying failed deliveries without sending twice.