Daily challenge for 2026-11-12
681. Warehouse Shelf Item Matching
A warehouse manages item bins using alphanumeric label codes. Each item in shelfItems has a label code, and each inquiry in catalogItems also specifies an item code.
An item is considered available if its code from catalogItems exists in shelfItems.
Return the count of distinct item codes in catalogItems that are present in shelfItems.
Example:
Input: shelfItems = ["A1", "B2", "C3", "A1"], catalogItems = ["B2", "D4", "A1", "B2"]
Output: 2
Constraints:
- 0 <= len(shelfItems), len(catalogItems) <= 1000
- Item codes consist of 1 to 10 uppercase letters and digits.
Run this challenge interactively in Python or JavaScript when the app loads.