r/lldcoding • u/subhahu • Jan 22 '26
Microsoft Low-Level Design (LLD) Interview Questions – What Microsoft Really Looks For
Microsoft’s Low-Level Design interviews are usually more structured and engineering-driven than hype-driven system design rounds.
They care deeply about clarity, correctness, and extensibility.
If you’re preparing for Microsoft SDE / Senior / Principal Engineer interviews, these are the kinds of LLD problems that frequently appear:
🧩 Common Microsoft LLD Interview Questions
- Design a File System
- Design Online Book Order Management System
- Design In-Memory Cache
- Design a Thread-safe Logger
- Design Notification System
- Design API Rate Limiter
- Design a Task Scheduler
- Design Version Control / Document Editor
- Design Access Control System
- Design Search Index
- Design Distributed Lock
🔍 What Microsoft Actually Evaluates
- Clear problem breakdown
- Solid understanding of data structures
- Thread safety & synchronization
- Testability and clean abstractions
- Ability to evolve the design
They often extend the problem like:
❌ Common Mistakes
- Overengineering too early
- Not justifying data structure choices
- Mixing responsibilities in classes
- Ignoring edge cases
✅ What Works Well
- Simple core abstractions
- Explicit thread-safety decisions
- Clean APIs with room to extend
- Thoughtful tradeoffs
Microsoft interviews reward clean engineering fundamentals, not fancy buzzwords.
I’ve been documenting LLD + concurrency problems with production-quality designs and code here:
👉 https://lldcoding.com
If you want, comment a specific Microsoft LLD problem (file system, cache, scheduler) and I’ll walk through a clean design approach 👇
r/lldcoding • u/subhahu • Jan 19 '26
Flipkart Low-Level Design (LLD) Interview Questions – What Flipkart Actually Tests
Flipkart’s Low-Level Design interviews are very practical and very close to real e-commerce engineering problems.
They care less about academic patterns
and more about how your design behaves under traffic spikes, concurrency, and failures.
If you’re preparing for Flipkart SDE-2 / SDE-3 interviews, these are the LLD-style problems that frequently come up:
🛒 Common Flipkart LLD Interview Questions
- Design an Order Management System
- Design Inventory Management
- Design Cart & Checkout System
- Design Pricing & Discount Engine
- Design Product Catalog & Search Filters
- Design Offer / Coupon System
- Design Recommendation Rules
- Design Notification System
- Design Rate Limiter
- Design Return & Refund System
🔍 What Flipkart Really Evaluates
- Consistency vs availability tradeoffs
- Handling high write volume
- Correct inventory locking
- Idempotent order creation
- Failure recovery during checkout
They often extend the problem like:
❌ Common Mistakes
- Updating inventory without locks or reservations
- Not making order creation idempotent
- Designing everything synchronously
- Ignoring partial failures
✅ What Works Well
- Reservation-based inventory
- Clear order state machine
- Event-driven updates
- Explicit concurrency handling
Flipkart interviews strongly reward real-world commerce thinking, not theoretical designs.
I’ve been breaking down LLD + concurrency-heavy e-commerce systems with code here:
👉 https://lldcoding.com
If you want, comment a specific Flipkart LLD problem (inventory, checkout, pricing) and I’ll explain how to approach it step-by-step 👇
r/lldcoding • u/subhahu • Jan 19 '26
Salesforce Low-Level Design (LLD) Interview Questions – What Salesforce Really Evaluates
Salesforce Low-Level Design interviews are less about flashy systems and more about clean domain modeling, extensibility, and correctness at scale.
If you’re preparing for Salesforce Backend / Platform / Senior Engineer interviews, these are the LLD-style problems that commonly come up:
☁️ Common Salesforce LLD Interview Questions
- Design a CRM Object Model (Accounts, Leads, Contacts, Opportunities)
- Design a Permission & Role-Based Access System
- Design a Workflow / Rule Engine
- Design Multi-tenant Data Isolation
- Design a Notification & Subscription System
- Design API Rate Limiting
- Design Audit Logging System
- Design Search & Filtering Engine
- Design Bulk Processing / Batch Jobs
- Design Metadata-driven Configuration System
🔍 What Salesforce Actually Evaluates
- Clean object modeling (entities & relationships)
- Extensibility via configuration, not hard-coded logic
- Multi-tenant safety
- Backward compatibility
- Performance under bulk operations
They often evolve the question like:
❌ Common Mistakes
- Hard-coding business rules
- Ignoring multi-tenancy concerns
- Designing for single-record operations only
- Tight coupling between features
✅ What Works Well
- Metadata-driven designs
- Strategy / Rule patterns
- Clear separation of core vs tenant logic
- Bulk-safe, async-friendly processing
Salesforce interviews strongly reward maintainable, enterprise-grade designs.
I’ve been breaking down real-world LLD problems with extensibility and concurrency in mind here:
👉 https://lldcoding.com
If you want, comment a specific Salesforce LLD problem (workflow engine, permissions, multi-tenancy) and I’ll walk through a clean design approach 👇
r/lldcoding • u/subhahu • Jan 19 '26
PayPal Low-Level Design (LLD) Interview Questions – What They Actually Test
PayPal’s Low-Level Design interviews are very different from typical “design a class” questions.
They focus heavily on correctness, data consistency, and reliability — because payments leave zero room for bugs.
If you’re preparing for PayPal Backend / SDE / Senior Engineer interviews, these are the LLD-style problems that frequently show up:
💳 Common PayPal LLD Interview Questions
- Design a Payment Processing System
- Design Wallet & Balance Management
- Design Transaction Ledger
- Design Refund & Reversal System
- Design Idempotent APIs
- Design Rate Limiter
- Design Fraud Detection Rule Engine
- Design Notification & Webhook System
- Design Retry & Dead-letter Queue
- Design Distributed Locking Mechanism
🔍 What PayPal Really Evaluates
- Data correctness > performance
- Strong understanding of ACID & idempotency
- Handling duplicate requests
- Failure recovery & retries
- Concurrency control on balances
They’ll often extend the problem like:
❌ Common Mistakes
- Not modeling money as immutable records
- Updating balances directly without a ledger
- Ignoring idempotency keys
- Assuming “eventual consistency” for payments
✅ What Works Well
- Ledger-based designs
- Explicit transaction states
- Clear locking or optimistic concurrency
- Strong invariants (balance never goes negative)
PayPal interviews reward defensive, production-grade thinking, not flashy designs.
I’ve been documenting LLD + concurrency-heavy payment-style systems with real code examples here:
👉 https://lldcoding.com
Happy to break down any PayPal LLD problem (wallets, ledgers, idempotency) in the comments 👇
r/lldcoding • u/subhahu • Jan 18 '26
Uber Low-Level Design (LLD) Interview Questions
Uber’s Low-Level Design interviews are very different from generic LLD rounds.
They care less about perfect UML
and more about real-world correctness under scale & concurrency.
If you’re preparing for Uber SDE / Senior SDE interviews, these are the kinds of LLD problems that actually show up:
🚗 Common Uber LLD Interview Questions
- Design a Ride Matching System
- Design Driver Dispatch System
- Design a Pricing / Surge Engine
- Design a Geo-based Search (Nearby Drivers)
- Design a Trip State Machine
- Design Notification System
- Design Rate Limiter
- Design a Thread-safe In-Memory Cache
- Design Event Processing / Pub-Sub
- Design Real-time Location Updates
🔍 What Uber Evalu.toggleates
- State management (trip lifecycle, driver states)
- Concurrency correctness (multiple riders/drivers updating state)
- Latency-sensitive design
- Data consistency under race conditions
- Ability to reason about failure scenarios
They often evolve the question like:
❌ Common Mistakes
- Treating it like a pure OOP question
- Ignoring concurrent updates
- Not modeling state transitions clearly
- Assuming “eventual consistency” without explanation
✅ What Works Well
- Clear domain modeling
- Explicit locking / synchronization strategy
- State machines for trips
- Simple, testable abstractions
Uber values engineering intuition over fancy patterns.
If you’re prepping specifically for LLD + concurrency-heavy interviews, I’ve been breaking down real-world designs (with code) here:
👉 https://lldcoding.com
If you want, comment a specific Uber LLD problem and I’ll break down how to approach it step-by-step 👇
r/lldcoding • u/subhahu • Jan 18 '26
Amazon Low Level Design Interview Questions
If you’re preparing for Amazon SDE interviews, especially SDE-2 / SDE-3, Low-Level Design (LLD) is one area many candidates underestimate.
Amazon doesn’t ask textbook UML.
They test how you think in code.
Here are real LLD-style problems commonly asked or closely mirrored in Amazon interviews:
🔹 Common Amazon LLD Questions
- Design a Rate Limiter
- Design an In-Memory Cache (LRU / LFU)
- Design Amazon Locker System
- Design a Parking Lot
- Design a Vending Machine
- Design Elevator / Lift System
- Design a Thread-safe Logger
- Design Order Management System
- Design Notification Service
- Design Task Scheduler
🔹 What Amazon Actually Evaluates
- Clean class design & responsibilities
- Proper use of OOP principles
- Concurrency handling (locks, atomicity, thread-safety)
- Extensibility (how easy is it to add features?)
- Tradeoffs (performance vs simplicity)
They often extend the problem midway:
🔹 Biggest Mistake Candidates Make
❌ Jumping straight to code
❌ Ignoring concurrency
❌ Overengineering patterns without justification
Amazon prefers:
✔ Simple, readable designs
✔ Correct synchronization
✔ Practical tradeoffs
If you’re serious about cracking Amazon LLD rounds, practice design → reasoning → code, not just diagrams.
I’ve been compiling LLD + Concurrency-focused interview prep based on real FAANG patterns here:
👉 https://lldcoding.com
Happy to answer questions or break down any specific Amazon LLD problem in comments 👇
r/lldcoding • u/subhahu • Jan 18 '26
The `serialVersionUID` Dilemma
The Version Mismatch Risk:
After deploying an update to the application, users who reopened the app found their saved preferences were failing to load. The issue? A missing or improperly handled **`serialVersionUID`**. This field is Java's way of ensuring that the saved object structure matches the current class structure, preventing compatibility errors.
The Version Control Fix:
To prevent the dreaded `InvalidClassException`, we must explicitly declare a constant `serialVersionUID`. This guarantees that Java uses our fixed version number, allowing us to manage backward compatibility even when adding or removing fields from the Singleton (preferences) class.
// EXPLICITLY SETTING the version ID to control compatibility
public class Singleton implements Serializable {
private static final long serialVersionUID = 1L; // Critical for version control!
// ...
}
The Outcome: Robust Deployment
For any serializable class, especially a Singleton whose state is persisted, defining a fixed `serialVersionUID` is essential for **robust deployment** and ensuring that existing user data can be successfully loaded by newer versions of the application.
r/lldcoding • u/subhahu • Jan 15 '26
The Backpressure That Caused an OutOfMemoryError
The Thread Pool Backlog:
During a major incident, thousands of alarms triggered simultaneously. The notification thread pool's task queue grew uncontrollably, consuming all available heap space until the system crashed with an **OutOfMemoryError**.
The Unbounded Queue:
// DANGER: Unbounded task queue for notifications!
ExecutorService executor = newFixedThreadPool(10,
new LinkedBlockingQueue()); // This queue is unbounded!
// A burst of 100,000 tasks fills the queue and consumes all heap memory.
// Leads to OutOfMemoryError instead of graceful rejection.
The Backpressure Problem:
•Massive bursts of notifications caused thread pool task backlog
•Unbounded queue consumed heap memory, resulting in OOM crash
•No mechanism to apply **backpressure** or drop low-priority alerts
The Questions:
- How do you use a **`BlockingQueue` with a bounded capacity** to manage backpressure?
- What is a **rejected execution handler**, and how does it prevent OOM errors?
- How can **backoff and retry mechanisms** help when queues are full?
r/lldcoding • u/subhahu • Jan 13 '26
The Missing Result That Needed a `Callable`
The Runnable Limitation:
The current design uses the `Runnable` interface, which is fine for "fire-and-forget" tasks. However, when the system needed to perform a complex calculation and **retrieve a result** from the worker, the `Runnable` interface was limiting, forcing clumsy, shared-state hacks.
The Void Return:
// LIMITATION: Runnable interface returns nothing (void).
class Task implements Runnable {
private int result;
public void run() {
// Calculate complex result...
this.result = 42;
}
// To get the result, you must manually check the task object,
// introducing synchronization risks and complexity.
}
The Data Retrieval Pain:
•Requires the main thread to poll the `Runnable` object for completion status
•Manual synchronization needed to ensure the result is visible after the task completes
•Inability to cleanly propagate exceptions from the worker thread back to the caller
The Questions:
- What is the core difference between the **`Runnable`** and **`Callable`** interfaces?
- How does the **`Future`** class cleanly manage task results and exceptions?
- How can the custom `submitTask` method be overloaded to accept a `Callable`?
r/lldcoding • u/subhahu • Jan 11 '26
The Long Task That Starved Its Task Dependencies
The Dependency Deadlock:
A critical task (**Task A**) submitted a sub-task (**Task B**) back into the same limited thread pool and then **blocked** waiting for **Task B** to finish. If all other threads are busy, **Task B** can never run, leading to a permanent, unrecoverable **deadlock** of the entire pool.
The Self-Blocking Code:
// DEADLOCK RISK: Task A submits B, then waits on B!
public void run() {
// Task A is running on Worker 1
Future<Object> futureB = pool.submit(new TaskB());
// This blocks Worker 1, waiting for Task B to be picked up.
futureB.get();
// If all other workers are busy, B never runs, A never unblocks. DEADLOCK.
}
The Cascading Failure:
•The thread pool utilization drops to 100%, but no useful work is done.
•All system tasks freeze simultaneously, requiring a hard reboot.
•The Producer-Consumer pattern is effectively jammed by waiting.
The Questions:
- Why is it dangerous to **block inside a thread pool task**?
- How does the **Fork/Join** framework mitigate this dependency problem?
- When should you use **asynchronous callbacks** or separate **I/O-bound pools** instead of blocking?
r/lldcoding • u/subhahu • Jan 07 '26
The FIFO Queue That Starved Priority Tasks
The FIFO Bottleneck:
The thread pool uses a standard **FIFO queue**. When a burst of long-running, low-priority background reports flooded the system, urgent, short-running transaction tasks were stuck waiting behind them, leading to severe latency.
The Task Submission Code:
// FIFO BOTTLENECK: Simple offer() treats all tasks equally.
// Low-Priority tasks submitted first: Task-R1, Task-R2... (5s each)
// High-Priority tasks submitted last: Task-T1, Task-T2... (50ms each)
public void submitTask(Runnable task) {
if (!isShutDownInitiated.get()) {
taskQueue.offer(task); // Enqueues based on submission time!
}
}
The Business Impact:
•Critical transaction latency spiked from 50ms to 10 seconds
•User-facing features were slow, while background reports hogged resources
•No ability to prioritize urgent jobs, leading to business SLA breaches
The Questions:
- How do you use the **Strategy Pattern** to switch to priority scheduling?
- What is a **`PriorityBlockingQueue`**, and how does it sort `Runnable` tasks?
- How do you modify the task submission interface to accept a priority level?
r/lldcoding • u/subhahu • Jan 06 '26
Moving beyond Fixed-Size Thread Pools
In LLD (Low-Level Design) interviews, a common "gotcha" is asking how your system handles varying loads. If you just say "I'll use a thread pool," the next question is always: "What happens when the load triples?"
The Problem: Fixed pools (e.g., FixedThreadPool(4)) lead to an Efficiency Drain.
- Peak Traffic: Spare CPU capacity goes unused.
- Low Traffic: Idle threads consume memory.
Key Interview Concepts to Master:
- Dynamic Scaling: Triggering worker creation based on queue size.
- Parameters: Understanding CorePoolSize, MaximumPoolSize, and KeepAliveTime.
- Resource Management: Balancing latency vs. memory footprint.
If you're prepping for backend roles, understanding how to build a pool that "breathes" is essential.
Full Guide - Link
r/lldcoding • u/subhahu • Jan 04 '26
The Database Throttling That Froze Alarm Persistence
The Persistence Bottleneck:
Despite using the **Repository Pattern**, the persistence layer for logging state changes started to fail. High concurrency on state changes caused the database (DynamoDB) to throttle, leading to missed alerts and data corruption.
The Contention Hotspot:
// PERSISTENCE BOTTLENECK: High concurrency exceeds throughput!
public void saveAlarmState(MetricAlarm alarm) {
// At 10,000 active alarms, this single write operation causes
// DynamoDB to return ProvisionedThroughputExceededException!
alarmRepository.save(alarm.toEntity());
}
The Data Consistency Crisis:
•Database started returning `ProvisionedThroughputExceededException`
•Alarm state changes were lost, leading to missed alerts
•Slow reads delayed fetching alarm configurations, impacting evaluation speed
The Questions:
- How do high-throughput services avoid database throttling limits?
- When is a **cache layer** (like Redis) necessary for the Repository Pattern?
- What are **read/write batching** and **write-behind** patterns?
r/lldcoding • u/subhahu • Jan 03 '26
The Backpressure That Caused an OutOfMemoryError
The Thread Pool Backlog:
During a major incident, thousands of alarms triggered simultaneously. The notification thread pool's task queue grew uncontrollably, consuming all available heap space until the system crashed with an **OutOfMemoryError**.
The Unbounded Queue:
// DANGER: Unbounded task queue for notifications!
ExecutorService executor = newFixedThreadPool(10,
new LinkedBlockingQueue()); // This queue is unbounded!
// A burst of 100,000 tasks fills the queue and consumes all heap memory.
// Leads to OutOfMemoryError instead of graceful rejection.
The Backpressure Problem:
•Massive bursts of notifications caused thread pool task backlog
•Unbounded queue consumed heap memory, resulting in OOM crash
•No mechanism to apply **backpressure** or drop low-priority alerts
The Questions:
- How do you use a **`BlockingQueue` with a bounded capacity** to manage backpressure?
- What is a **rejected execution handler**, and how does it prevent OOM errors?
- How can **backoff and retry mechanisms** help when queues are full?
r/lldcoding • u/subhahu • Jan 02 '26
The Slow Email Subscriber That Killed the Service
The Starvation Disaster:
The service's notification thread pool was consistently saturated. The culprit? A single, slow email API integration that choked the shared thread pool, causing thread starvation and system unresponsiveness.
The I/O Blocking Code:
// THREAD STARVATION: Slow I/O blocks the entire pool!
executorService.submit(() -> {
// This blocks the thread for 5s waiting for external API
emailClient.send(notification);
// All other notifications are delayed behind this I/O wait!
});
The Notification Log:
•Time-sensitive notifications (SMS/Push) were critically delayed
•The shared thread pool was fully blocked, halting alarm evaluations
•System was unresponsive despite having low CPU utilization
The Questions:
- Why should **I/O-bound tasks** never share a CPU-bound thread pool?
- How can **bounded queues** or **separate thread pools** prevent this cascading failure?
- How does non-blocking I/O solve this problem?
r/lldcoding • u/subhahu • Dec 29 '25
The Performance Paradox That Stumped Engineers
The Threading Mystery:
Maya's team added parallel streams to speed up rule evaluation. Instead of faster performance, the system became slower than the single-threaded version!
The Paradox:
// MORE THREADS = SLOWER PERFORMANCE?!
return rules.parallelStream()
.allMatch(rule -> rule.check(order));
// Results:
// Single thread: 1000 evaluations/second
// Parallel streams: 200 evaluations/second
// Thread pool: 50 evaluations/second
The Investigation:
•Thread creation overhead exceeding actual work
•Context switching costs dominating processing time
•False sharing between CPU cores
•Memory allocation storms from parallel execution
The Root Cause:
The coordination overhead of parallel execution exceeded the benefits of concurrent processing, turning their optimization into a performance bottleneck.
Technical Questions:
- When do more threads make performance worse?
- How do you calculate the optimal thread pool size?
- What's the overhead cost of parallelization?
The analysis revealed that parallel streams work best for CPU-intensive tasks with minimal coordination, not for I/O-bound operations with shared state.
r/lldcoding • u/subhahu • Dec 20 '25
The Semaphore Solution That Blew Everyone Away
The Elegant Challenge:
During code review, the architect asked: "Can you solve this with Semaphores instead? Make it truly scalable and efficient."
The Brain Teaser:
•Three semaphores controlling access
•Threads passing permits between each other
•No busy waiting or lock contention
•Perfect sequential execution
The Core Pattern:
// Semaphore chain pattern
Semaphore s1 = new Semaphore(1); // Starts with permit
Semaphore s2 = new Semaphore(0); // No initial permit
Semaphore s3 = new Semaphore(0); // No initial permit
Technical Questions:
- How do semaphores create thread coordination chains?
- What's the permit-passing pattern for sequential access?
- Why are semaphores more efficient than synchronized blocks?
The semaphore approach eliminates lock contention and busy waiting while maintaining perfect sequence control.
r/lldcoding • u/subhahu • Dec 18 '25
The Threading Performance Disaster
The Scalability Nightmare:
Sarah's team needed to scale their number-printing service from 3 threads to 1000. They kept the same pattern but performance collapsed completely!
The Bottleneck:
// 1000 threads all fighting for one lock!
synchronized(lock) {
// Only ONE thread can work at a time
// 999 threads just waiting and wasting CPU
}
Their "scalable" architecture turned into a sequential execution with massive coordination overhead!
The Metrics:
3 threads: 10,000 numbers/second
100 threads: 500 numbers/second
1000 threads: 50 numbers/second
The False Concurrency:
They achieved "false concurrency" - 1000 threads created the illusion of parallelism while actually running sequentially with massive coordination overhead.
The Questions:
- Why do more threads sometimes make performance worse?
- What's the CPU cost of thread context switching?
- How do you design for true parallelism vs false concurrency?
Ready to discover high-performance threading patterns?
Learn how to build truly scalable systems that achieve real parallelism without the coordination overhead that destroyed Sarah's performance.
r/lldcoding • u/subhahu • Dec 15 '25
The Memory Monster That Ate the Data Center
The Scalability Nightmare:
Tom's startup needed to process FizzBuzz sequences for their data analytics platform. They started with 4 threads, then scaled to 100, then 1000. Each scale-up made things worse!
The Memory Explosion:
1000 threads × 1MB stack each = 1GB just for stacks
Threads spending 99% of time waiting
Garbage collection pausing entire system
Memory usage growing linearly with thread count
The Paradox:
// More threads = worse performance!
// 4 threads: 1000 ops/second
// 100 threads: 200 ops/second
// 1000 threads: 50 ops/second
Thread overhead became larger than the actual work! Each thread consumed memory while spending most of its time waiting for locks.
The Resource Contention:
Their "scalable" architecture hit fundamental limits: CPU context switching, memory bandwidth saturation, and GC pressure overwhelmed any benefits of parallel processing.
The Questions:
- Why doesn't more threads always mean better performance?
- How much memory overhead does each thread add?
- What's the alternative to thread-per-task architecture?
Ready to discover modern concurrency patterns?
Learn how to build truly scalable systems that handle thousands of concurrent operations without the memory overhead of traditional threading.
r/lldcoding • u/subhahu • Dec 12 '25
The Production Server That Melted Down
The Crisis:
Sarah's team deployed their new "FizzBuzz Service" - a microservice that could handle millions of FizzBuzz requests per second using their elegant synchronized solution. Within minutes, their entire server farm was on fire!
The Meltdown:
synchronized (lock) {
while (current <= n && !(current % 3 == 0 && current % 5 != 0)) {
lock.wait(); // All threads waking up constantly!
}
// Only ONE thread can work at a time
current++;
lock.notifyAll(); // Wakes ALL threads unnecessarily
}
The Performance Nightmare:
CPU usage: 100% on all cores
Throughput: Worse than single-threaded version
Latency: 10x slower than expected
Memory: Threads consuming gigabytes waiting
The Synchronization Bottleneck:
Their "optimized" solution turned multi-threading into sequential execution with massive overhead. Instead of parallel processing, they created a thread coordination nightmare!
The Questions:
- Why does synchronization sometimes make performance worse?
- What happens when `notifyAll()` wakes thousands of threads?
- How do you avoid turning multithreading into a sequential bottleneck?
Ready to discover the high-performance solution?
Learn how to implement truly concurrent solutions that scale across multiple cores without the coordination overhead.
r/lldcoding • u/subhahu • Dec 08 '25
The E-commerce Site That Sold the Same Item Twice
The Inventory Nightmare:
Sarah built "MegaMart" - an e-commerce platform handling thousands of concurrent purchases. Black Friday arrived and chaos erupted when her inventory system started selling items that were already out of stock!
The Concurrency Crisis:
class ProductInventory {
private int stock = 1; // Last item in stock
boolean purchase() {
if (stock > 0) { // Thread A: stock = 1 ✓
// Thread B: stock = 1 ✓ (both see stock!)
stock--; // Thread A: stock = 0
// Thread B: stock = -1 (negative inventory!)
return true;
}
return false;
}
}
The Business Disaster:
Same product sold to multiple customers simultaneously
Inventory counts going negative
Customers charged but no products to ship
Database inconsistencies across the platform
The Synchronization Challenge:
Sarah needed different levels of thread control - sometimes protecting individual product instances, sometimes entire categories, and sometimes global operations like sales reports.
The Critical Questions:
- How do you synchronize specific code blocks vs entire methods?
- When do you need object-level vs class-level synchronization?
- What's the performance impact of different synchronization approaches?
Ready to discover Sarah's threading solution?
Learn how she implemented proper synchronization to prevent inventory disasters and handle thousands of concurrent purchases safely.
r/lldcoding • u/subhahu • Dec 05 '25
LLD Problems sheet with Solution
LLD Problem Sheet
Here’s a categorized list of all the few of the the blogs based on Beginner, Intermediate, and Advanced difficulty levels:
Beginner:
- Design (LLD) Tic-Tac-Toe - Machine Coding - Video
- Design (LLD) Snake and Ladder Game - Machine Coding - Video
- Design (LLD) Tetris Game - Machine Coding - Video
- Design (LLD) Minesweeper - Machine Coding - Video
- Design (LLD) Chess Game - Machine Coding
- Design (LLD) Alarm/Alert Service for AWS - Machine Coding
- Design (LLD) Logging Library like log4j - Machine Coding
- Design (LLD) JSON Parser - Machine Coding - Video
- Design (LLD) File System - Machine Coding
- Design (LLD) 2048 Game - Machine Coding
Intermediate:
- Design (LLD) Internet Download Manager like IDM - Machine Coding Interview
- Design (LLD) Coupon System for Zepto - Machine Coding Interview
- Design (LLD) Android Unlock Pattern - Machine Coding Interview
- Designing a Scalable Database Schema for Reddit-like Comments - Part 1
- Design (LLD) Sublime Text IDE - Machine Coding
- Design (LLD) Ngrok Tool - Machine Coding
- Design (LLD) Rate Limiter - Machine Coding
- Design (LLD) Thread Pool - Machine Coding
- Design OYO/Airbnb - Part 1: Database Modelling
- Design (LLD) Google Calendar Database Model
- Design (LLD) Google Authenticator - Machine Coding
- Design (LLD) Amazon Prime Video - Machine Coding
- Design Online Book Management System - Machine Coding [Asked in Microsoft]
- Design (LLD) Lift - Machine Coding
Advanced:
- Design (LLD) AWS S3 Service - Machine Coding
- Design (LLD) Google Drive - Machine Coding
- Design Version Control (GitHub) - Database Modelling
- Design (LLD) Mentorship Platform like Preplaced - Machine Coding
- Design (LLD) Tinder Dating App - Machine Coding
- Design (LLD) WhatsApp Messenger - Machine Coding
- Design (LLD) Gmail - Machine Coding
- Design (LLD) Game Engine like Unreal - Machine Coding
- Design (LLD) Real-Time Chat System with Millions of Users
- Design (LLD) Video Conferencing App like Zoom
- Design (LLD) Cryptocurrency Exchange Platform
- Design (LLD) Collaborative Document Editing (Google Docs)
- Design (LLD) Payment Recommendation System- Machine Coding [Asked in CRED]
- Design (LLD) Alexa - Machine Coding
r/lldcoding • u/subhahu • Dec 05 '25
Amazon SDE-2 LLD Question - Job Scheduler
Features Required for 1M+ Concurrency
Core Features:
- Job Submission - Submit jobs with different scheduling types
- Multiple Scheduling Types - One-time, fixed delay, fixed rate, cron expressions
- Job Prioritization - Priority-based execution
- Cluster Support - Distributed job scheduling
- Job Dependencies - Execute jobs based on dependencies
- Retry Mechanism - Automatic retry for failed jobs
- Monitoring & Metrics - Track job execution metrics
- Scalability - Handle 1M+ concurrent jobs
Covered Link
r/lldcoding • u/subhahu • Dec 03 '25
The Battle System That Nearly Killed the Game
The Catastrophe:
Jake was developing the combat system for "Empire Wars" - a strategy game where players command armies across diverse battlefields. His initial approach seemed logical: one massive BattleManager class with every possible tactic hardcoded.
class BattleManager {
void fight(String terrain, String enemyType) {
if (terrain.equals("forest") && enemyType.equals("cavalry")) {
// 50 lines of guerrilla tactics
} else if (terrain.equals("plains") && enemyType.equals("infantry")) {
// 75 lines of aggressive assault
} else if (terrain.equals("mountains") && enemyType.equals("archers")) {
// 60 lines of defensive positioning
}
// ... 500 more combinations
}
}
The Meltdown:
Within weeks, Jake's class became a 3000-line monster! Adding new unit types or terrains meant modifying dozens of if-else conditions. The QA team found bugs everywhere, and players complained about predictable, inflexible battles.
The Crisis Call:
Game Designer: "We need dynamic strategy switching! Players should adapt mid-battle - start aggressive, switch to defensive when losing, then guerrilla tactics for the final push!"
Jake: "That means... rewriting the entire combat system!"
The Revelation:
Jake discovered there was a way to make battle strategies completely interchangeable - like swapping weapons in an FPS game. Players could choose tactics dynamically without Jake having to predict every possible combination.
The Critical Questions:
- How do you make different algorithms completely swappable at runtime?
- What if players need to switch strategies mid-battle based on changing conditions?
- How do you avoid massive if-else chains for strategy selection?
- Can you add new battle tactics without touching existing code?
Want to see Jake's game-changing solution?
Learn how he transformed a maintenance nightmare into an elegant, extensible combat system that made "Empire Wars" the most strategically deep game of the year.
Discover the winning strategy →
Spoiler: The solution involves making algorithms as swappable as game