Daily challenge for 2026-10-18
656. Shared Locker Count
You are given a list of locker assignments, where each assignment is represented as a string in the format "locker_id:owner_name". A locker is considered "shared" if it has been assigned to more than one distinct owner. Duplicate assignments (same locker and same owner) do not count as multiple owners. Return the total number of shared lockers.
Constraints:
There are 0–1,000 assignment strings. Every string has exactly one colon separating a non-empty locker id and a non-empty owner name; neither part contains a colon. Ids and names are case-sensitive.
Example:
Input: assignments = ["101:Alice", "102:Bob", "101:Charlie", "101:Alice", "103:David"]
Output: 1
Run this challenge interactively in Python or JavaScript when the app loads.