Daily challenge for 2026-07-11
557. Hotel Room Keycard Logs
You are given a list of keycard event strings, where each event is formatted as "room:action". The room is a string identifier, and the action is either "IN" (guest enters) or "OUT" (guest exits). Assuming all rooms start empty, determine which rooms are currently occupied (i.e., their last recorded action was "IN"). Return the occupied room identifiers as a sorted list of strings.
Example:Input: events = ["101:IN", "202:IN", "101:OUT", "305:IN"]Output: ["202", "305"]
Run this challenge interactively in Python or JavaScript when the app loads.