High-Level & Low-Level Design Interview Problems Interview Questions Hindi mein

High-Level & Low-Level Design Interview Problems कोर्स के 25 सवाल, हर सवाल के सही जवाब और explanation के साथ। जवाब देखने से पहले ख़ुद सोचें।

How Design Rounds Work

1. Which signal matters most in an LLD round?

  1. Estimating global bandwidth
  2. Choosing between two cloud vendors
  3. Clear class responsibilities and extensible, correct code
  4. Designing a CDN topology
जवाब देखें

जवाब: Clear class responsibilities and extensible, correct code

LLD is about object modelling and code quality.

पाठ: HLD Versus LLD Rounds

2. What should come first in either round?

  1. Clarifying requirements and scope
  2. Writing the database schema
  3. Picking a message broker
  4. Implementing the hardest method
जवाब देखें

जवाब: Clarifying requirements and scope

Design follows requirements.

पाठ: A Compact Approach for Each Round

3. Which is a common LLD mistake?

  1. Mentioning thread safety
  2. Separating pricing into its own strategy
  3. Asking about requirements
  4. Putting most logic in one large god class
जवाब देखें

जवाब: Putting most logic in one large god class

Responsibilities should be split.

पाठ: Common Mistakes

LLD Fundamentals for Interviews

4. A Loan that holds a reference to a BookCopy is best described as:

  1. Inheritance from BookCopy
  2. An association between Loan and BookCopy
  3. A static utility method
  4. An enum value
जवाब देखें

जवाब: An association between Loan and BookCopy

A loan refers to a copy; it is not a kind of copy.

पाठ: Finding Entities and Relationships

5. Adding a new pricing rule by writing a new class rather than editing existing ones follows which principle?

  1. Liskov substitution
  2. Open/closed
  3. Interface segregation
  4. Single table inheritance
जवाब देखें

जवाब: Open/closed

Open for extension, closed for modification.

पाठ: SOLID Applied Briefly

6. A vending machine that behaves differently when idle, holding money or dispensing is a natural fit for:

  1. A bigger switch statement in every method
  2. The Singleton pattern
  3. The Adapter pattern
  4. The State pattern
जवाब देखें

जवाब: The State pattern

One class per state.

पाठ: Patterns That Recur in LLD

LLD Problems I

7. Why make spot allocation atomic?

  1. So two gates cannot assign the same spot at the same time
  2. To speed up fee calculation
  3. To avoid needing tickets
  4. Because enums are not thread safe
जवाब देखें

जवाब: So two gates cannot assign the same spot at the same time

Concurrent entries race for spots.

पाठ: Design a Parking Lot

8. In the LOOK policy, when does the car reverse direction?

  1. Only at the top and bottom floors
  2. After every floor
  3. When no requested stops remain ahead in the current direction
  4. When a random timer fires
जवाब देखें

जवाब: When no requested stops remain ahead in the current direction

LOOK reverses at the last request, not the building edge.

पाठ: Design an Elevator System

9. What should happen when a product is selected in the Idle state?

  1. The machine moves to Dispensing
  2. The product is dispensed for free
  3. The request is rejected because no money has been inserted
  4. The balance becomes negative
जवाब देखें

जवाब: The request is rejected because no money has been inserted

Each state allows only valid actions.

पाठ: Design a Vending Machine

LLD Problems II

10. Why use a temporary hold with an expiry?

  1. So seats are reserved during payment but released if the user abandons
  2. To make payment optional
  3. To avoid needing a database
  4. To let two users share a seat
जवाब देखें

जवाब: So seats are reserved during payment but released if the user abandons

Holds protect the payment window without locking seats forever.

पाठ: Seat Booking With Concurrency

11. Why is a doubly linked list used rather than a singly linked list?

  1. To avoid using a hash map
  2. To sort keys alphabetically
  3. To store duplicate keys
  4. To unlink a node in O(1) given only a reference to it
जवाब देखें

जवाब: To unlink a node in O(1) given only a reference to it

Removal needs the previous pointer.

पाठ: Design an LRU Cache Class

12. In a token bucket, what does the capacity control?

  1. The number of users
  2. The maximum burst of requests allowed at once
  3. The refill rate per second
  4. The request timeout
जवाब देखें

जवाब: The maximum burst of requests allowed at once

Capacity is burst; rate is sustained throughput.

पाठ: Design a Rate Limiter Class

HLD Problems I

13. Why keep live driver locations in an in-memory geo-index?

  1. Locations must be kept forever
  2. Updates are frequent and short-lived, and nearby lookups must be fast
  3. Relational joins are needed for every update
  4. Drivers rarely move
जवाब देखें

जवाब: Updates are frequent and short-lived, and nearby lookups must be fast

High-rate, ephemeral data with spatial queries.

पाठ: Design a Ride-Hailing Service

14. What prevents a retried payment request from charging the customer twice?

  1. Sharding the orders table
  2. A larger timeout
  3. Caching the product page
  4. An idempotency key sent with the charge
जवाब देखें

जवाब: An idempotency key sent with the charge

Same key, same result.

पाठ: Design E-commerce Checkout and Inventory

15. What does adaptive bitrate streaming do?

  1. Lets the player switch between renditions based on network conditions
  2. Compresses video on the client before upload
  3. Stores one rendition per user
  4. Replaces the CDN
जवाब देखें

जवाब: Lets the player switch between renditions based on network conditions

ABR adapts quality segment by segment.

पाठ: Design a Video Streaming Platform

HLD Problems II

16. With N = 3, which setting gives overlapping read and write quorums?

  1. W = 1 and R = 2
  2. W = 1 and R = 1
  3. W = 2 and R = 2
  4. W = 0 and R = 3
जवाब देखें

जवाब: W = 2 and R = 2

R + W must exceed N.

पाठ: Design a Distributed Key-Value Store

17. Why store top-k completions at each trie node?

  1. To support exact-match search only
  2. To reduce the number of prefixes
  3. So a lookup does not need to traverse the whole subtree
  4. To make writes faster than reads
जवाब देखें

जवाब: So a lookup does not need to traverse the whole subtree

Precomputation moves work off the read path.

पाठ: Design Search Autocomplete

18. How is a mistaken ledger entry corrected in a double-entry ledger?

  1. By appending a reversing entry, keeping history intact
  2. By editing the original amount
  3. By deleting the transaction row
  4. By changing the account balance directly
जवाब देखें

जवाब: By appending a reversing entry, keeping history intact

Ledgers are append-only for auditability.

पाठ: Design a Payment System and Ledger

HLD Problems III

19. Which property makes CRDTs attractive for offline editing?

  1. They forbid concurrent edits
  2. They require a single central lock
  3. They never store metadata
  4. Replicas can merge operations in any order and still converge
जवाब देखें

जवाब: Replicas can merge operations in any order and still converge

Convergence without central ordering.

पाठ: Design Collaborative Document Editing

20. Why should job handlers be idempotent?

  1. Because queues reorder all jobs randomly
  2. Because a job may run more than once after a worker failure and retry
  3. Because cron syntax requires it
  4. Because databases cannot store results
जवाब देखें

जवाब: Because a job may run more than once after a worker failure and retry

At-least-once delivery implies duplicates.

पाठ: Design a Distributed Job Scheduler

21. Why can adding a user id label to a metric be dangerous?

  1. Labels are not supported by time-series databases
  2. It can explode the number of time series (high cardinality)
  3. It makes metrics immutable
  4. It disables compression entirely
जवाब देखें

जवाब: It can explode the number of time series (high cardinality)

Each unique label combination is a new series.

पाठ: Design a Metrics and Logging Pipeline

Delivering and Practising

22. What makes an HLD diagram easier to follow?

  1. Drawing every class in the system
  2. Using as many boxes as possible
  3. Omitting data stores
  4. Labelled arrows showing what flows and whether calls are sync or async
जवाब देखें

जवाब: Labelled arrows showing what flows and whether calls are sync or async

Arrows carry the meaning.

पाठ: Drawing Clear Diagrams

23. Which statement best shows trade-off reasoning?

  1. Choosing eventual consistency for the feed to gain availability, while keeping payments strongly consistent
  2. Using the newest database because it is popular
  3. Saying the system will never fail
  4. Adding a cache everywhere without discussion
जवाब देखें

जवाब: Choosing eventual consistency for the feed to gain availability, while keeping payments strongly consistent

Tie choices to requirements and costs.

पाठ: Discussing Trade-offs and Failure Modes

24. What is the most realistic way to practise design rounds?

  1. Memorising one diagram per problem
  2. Reading many solutions without attempting them
  3. Timed mock interviews out loud with someone giving feedback
  4. Practising only the problems you already know
जवाब देखें

जवाब: Timed mock interviews out loud with someone giving feedback

Simulate the real conditions.

पाठ: A Practice Plan and Problem List

25. Which belongs on a design interview checklist?

  1. Avoiding any mention of failures
  2. Skipping requirements to save time
  3. Labelling estimates as assumptions and explaining trade-offs
  4. Using every design pattern you know
जवाब देखें

जवाब: Labelling estimates as assumptions and explaining trade-offs

Structure, honesty and judgement.

पाठ: Final Design Interview Checklist

← कोर्स पर वापस जाएँ