leetle

Daily challenge for 2026-09-14

622. Keycard Entry Pair Discrepancies

A security system records badge swipes as pairs of [employee_id, door_id] where both are positive integers. An employee is flagged for a discrepancy if there is at least one other employee who accessed an identical set of doors, but with a different number of total badge swipes. Return the number of unique employees flagged for this discrepancy.

Example:
Input: swipes = [[1, 10], [1, 20], [2, 10], [2, 20], [2, 10]]
Output: 2
Explanation: Employee 1 visited doors {10, 20} with 2 swipes. Employee 2 visited doors {10, 20} with 3 swipes. Both employees visited the same door set {10, 20}, but had different swipe counts (2 vs 3). Thus, both 1 and 2 are flagged.

Run this challenge interactively in Python or JavaScript when the app loads.