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:MISTAKESConfusing 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 - Clean Architecture layers - Quiz 7medium Advanced LLD Concepts - Event-driven design - Quiz 13medium Advanced LLD Concepts - Why advanced concepts handle production systems - Quiz 8hard Design — Chess Game - Special moves (castling, en passant) - Quiz 9hard Design — Chess Game - Game state management - Quiz 15hard Design — Food Delivery System - Rating and review system - Quiz 5medium Design — Food Delivery System - Why delivery systems test service coordination - Quiz 5medium Design — Hotel Booking System - Search and filter design - Quiz 1easy Design — Online Shopping Cart - Product, Cart, Order classes - Quiz 3easy Design — Splitwise (Expense Sharing) - Transaction history - Quiz 9hard