Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 1773. Count Items Matching a Rule
Given a list of items where each item is [type, color, name] and a ruleKey (type/color/name) plus ruleValue, return how many items have the corresponding field equal to ruleValue. This reduces to mapping ruleKey to a field index and performing a linear scan to count matches (O(n), n ≤ 10^4).
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.