LLD - Design — Hotel Booking SystemWhich of the following is the correct syntax to represent a filter for 'price greater than 50' in a JSON query?A{ \"price\": { \"$lt\": 50 } }B{ \"price\": { \"$eq\": 50 } }C{ \"price\": 50 }D{ \"price\": { \"$gt\": 50 } }Check Answer
Step-by-Step SolutionSolution:Step 1: Understand JSON filter operatorsIn JSON queries, "$gt" means 'greater than', "$lt" means 'less than', "$eq" means 'equals'.Step 2: Match operator to conditionFor 'price greater than 50', "$gt" operator is correct.Final Answer:{ "price": { "$gt": 50 } } -> Option DQuick Check:Greater than filter = "$gt" [OK]Quick Trick: Use "$gt" for greater than in JSON filters [OK]Common Mistakes:Using "$lt" instead of "$gt"Using equality operator for range filtersOmitting operator and just giving value
Master "Design — Hotel Booking System" in LLD9 interactive learning modes - each teaches the same concept differentlyLearnWhyDeepArchTryChallengeDesignRecallScale
More LLD Quizzes Advanced LLD Concepts - Thread safety in design - Quiz 5medium Design — Chess Game - Special moves (castling, en passant) - Quiz 13medium Design — Chess Game - Game state management - Quiz 2easy Design — Chess Game - Board and piece hierarchy - Quiz 5medium Design — Food Delivery System - Order tracking state machine - Quiz 9hard Design — Food Delivery System - Notification to all parties - Quiz 9hard Design — Food Delivery System - Why delivery systems test service coordination - Quiz 4medium Design — Online Shopping Cart - Product, Cart, Order classes - Quiz 7medium Design — Online Shopping Cart - Why e-commerce tests real-world complexity - Quiz 15hard Design — Online Shopping Cart - Why e-commerce tests real-world complexity - Quiz 1easy