Bird
0
0

In a search system with filters on brand='Nike' and rating >= 4, what is the expected output when these filters are applied together?

medium📝 Analysis Q4 of 15
LLD - Design — Hotel Booking System
In a search system with filters on brand='Nike' and rating >= 4, what is the expected output when these filters are applied together?
AProducts that have a rating of 4 or higher regardless of brand
BProducts that are either from brand Nike or have a rating of 4 or higher
CProducts that are from brand Nike regardless of rating
DProducts that are from brand Nike and have a rating of 4 or higher
Step-by-Step Solution
Solution:
  1. Step 1: Understand filter logic

    Filters combined typically use AND logic unless specified otherwise.
  2. Step 2: Apply both filters

    Only products satisfying both brand='Nike' and rating >= 4 are included.
  3. Final Answer:

    Products that are from brand Nike and have a rating of 4 or higher -> Option D
  4. Quick Check:

    AND logic for filters [OK]
Quick Trick: Filters combined with AND return intersection [OK]
Common Mistakes:
  • Assuming filters combine with OR logic
  • Ignoring one of the filter conditions
  • Confusing filter attribute values

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More LLD Quizzes