LLD - Design — Hotel Booking SystemIn a booking system, a bug causes all bookings to be treated as overlapping. What is a likely programming mistake?ANot sorting bookings before checkingBUsing OR instead of AND in overlap conditionCUsing AND instead of OR in overlap conditionDUsing a hash map for bookingsCheck Answer
Step-by-Step SolutionSolution:Step 1: Recall correct overlap conditionOverlap requires start1 < end2 AND start2 < end1.Step 2: Identify effect of using ORUsing OR makes condition too loose, causing overlaps to be detected even when there are none.Final Answer:Using OR instead of AND in overlap condition -> Option BQuick Check:Wrong logical operator breaks overlap detection [OK]Quick Trick: Use AND, not OR, for overlap checks [OK]Common Mistakes:Confusing AND and OR in conditionsIgnoring logical operator impact
Master "Design — Hotel Booking System" in LLD9 interactive learning modes - each teaches the same concept differentlyLearnWhyDeepArchTryChallengeDesignRecallScale
More LLD Quizzes Advanced LLD Concepts - Why advanced concepts handle production systems - Quiz 6medium Advanced LLD Concepts - Domain-Driven Design basics - Quiz 13medium Design — Chess Game - Board and piece hierarchy - Quiz 12easy Design — Chess Game - Observer pattern for UI updates - Quiz 15hard Design — Chess Game - Move validation and check detection - Quiz 3easy Design — Online Shopping Cart - Notification on state change - Quiz 6medium Design — Online Shopping Cart - Order state machine - Quiz 14medium Design — Splitwise (Expense Sharing) - Simplify debts algorithm - Quiz 5medium Design — Splitwise (Expense Sharing) - Why Splitwise tests financial logic - Quiz 2easy Design — Splitwise (Expense Sharing) - Why Splitwise tests financial logic - Quiz 12easy