0
0
LLDsystem_design~20 mins

Booking conflict resolution in LLD - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Booking Conflict Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
1:30remaining
What is the primary cause of booking conflicts in a shared resource system?
Consider a system where multiple users can book the same resource (e.g., a meeting room). What is the main reason booking conflicts occur?
AThe resource is physically unavailable due to maintenance.
BUsers forget to confirm their bookings after selecting a time slot.
CThe system does not allow cancellations or modifications of bookings.
DMultiple users attempt to book overlapping time slots for the same resource simultaneously.
Attempts:
2 left
💡 Hint
Think about what happens when two people try to reserve the same room at the same time.
Architecture
intermediate
1:30remaining
Which component is essential to prevent booking conflicts in a distributed booking system?
In a distributed booking system, which component helps ensure that two users cannot book the same resource at the same time?
AA load balancer to distribute booking requests evenly.
BA caching layer to store booking data temporarily.
CA centralized locking mechanism that locks the resource during booking.
DA notification service to alert users of booking status.
Attempts:
2 left
💡 Hint
Think about how to make sure only one booking can happen at a time for the same resource.
scaling
advanced
2:00remaining
How to scale a booking system to handle thousands of simultaneous booking requests without conflicts?
You need to design a booking system that supports thousands of users booking resources at the same time. Which approach best helps to scale while preventing booking conflicts?
ACache all bookings on the client side to reduce server load.
BPartition resources by time slots and use distributed locks per partition to allow parallel bookings.
CAllow bookings without locks and resolve conflicts manually later.
DUse a single global lock for all bookings to ensure consistency.
Attempts:
2 left
💡 Hint
Think about dividing the problem to handle many requests at once without blocking all bookings.
tradeoff
advanced
2:00remaining
What is a tradeoff when using optimistic concurrency control for booking conflict resolution?
Optimistic concurrency control lets users book without locking but checks for conflicts before finalizing. What is a key tradeoff of this approach?
AUsers may experience booking failures and need to retry, causing possible frustration.
BIt guarantees zero booking conflicts with no retries needed.
CIt requires a centralized lock, reducing system availability.
DIt prevents any concurrent booking attempts from happening.
Attempts:
2 left
💡 Hint
Think about what happens if two users book the same slot without locking first.
estimation
expert
2:00remaining
Estimate the maximum booking requests per second a system can handle with a single resource and a locking mechanism that takes 50ms per booking.
Assuming each booking request requires a lock on the resource that takes 50 milliseconds to process, what is the maximum number of booking requests per second the system can handle for that single resource?
A20 requests per second
B50 requests per second
C200 requests per second
D500 requests per second
Attempts:
2 left
💡 Hint
Calculate how many 50ms intervals fit into one second.