Skip to content

Implement CountItemsMatchingARule1773 with complexity analysis and tests#50

Merged
kobukuro merged 1 commit intomainfrom
feat/count-items-matching-rule
Mar 15, 2026
Merged

Implement CountItemsMatchingARule1773 with complexity analysis and tests#50
kobukuro merged 1 commit intomainfrom
feat/count-items-matching-rule

Conversation

@kobukuro
Copy link
Owner

  • Move source file to proper package structure (src/main/java/com/leetcode/easy/)
  • Implement countMatches method with O(n) time and O(1) space complexity
  • Add Javadoc complexity analysis following project conventions
  • Add JUnit tests with example cases

Algorithm: Single pass through items list, checking ruleKey against "type", "color", or "name" and matching against ruleValue.

 - Move source file to proper package structure (src/main/java/com/leetcode/easy/)
 - Implement countMatches method with O(n) time and O(1) space complexity
 - Add Javadoc complexity analysis following project conventions
 - Add JUnit tests with example cases

 Algorithm: Single pass through items list, checking ruleKey against "type", "color", or "name" and matching against ruleValue.
@kobukuro kobukuro merged commit 4c6ad33 into main Mar 15, 2026
1 check passed
@kobukuro kobukuro deleted the feat/count-items-matching-rule branch March 15, 2026 02:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant