Back to Notes

LLD Interview Approach

Format

Typically a 1–2 hour session: design a class structure, then implement it (usually in Python or Java). Common at companies with a dedicated machine-coding round (CRED, BrowserStack, Razorpay, Flipkart, Meesho) as distinct from the whiteboard-only HLD round.

The 5-Step Framework

1. Clarify (5 min)
   - Who are the users? What are the core operations?
   - Scale? Concurrency? Persistence needed?

2. Core entities (5 min)
   - Identify classes, their state, and relationships

3. Interface first (5 min)
   - Define public methods before implementing internals
   - Agree with the interviewer before writing logic

4. Implement (30-40 min)
   - Start with data structures
   - Then business logic
   - Handle edge cases last

5. Extensibility (5 min)
   - "To add X, I'd add a Strategy/Observer/..." — name the specific pattern, not just "it's extensible"

Why step 3 (interface-first) matters: committing to method signatures before implementation catches design mistakes cheaply — realizing ParkingLot.park() needs to return a Ticket instead of a bool is a 10-second fix before you've written the body, and a re-architecture after.

Why step 5 is scored, not decoration: "is it extensible" is usually asked directly as a follow-up ("now add electric vehicle charging spots"). Having already named the relevant pattern in step 5 means you're extending a design you planned for, not improvising.

Interview Drill

Q: You're 30 minutes into implementation and realize your core interface is wrong. What do you do? A: Say so out loud, propose the interface fix, and confirm before continuing — silently ploughing ahead with a known-bad interface reads worse than catching and fixing your own mistake transparently. Interviewers weight self-correction positively.

Cross-links

[[SOLID Principles]] · [[OOD Design Patterns]]