Each offer has an active time range and a maximum number of redemptions allowed per user. Given offers, events, and processingTime, return the offers that each user can still redeem at that time.
Each offers[i] is [offerId, startAt, endAt, userMaxRedemptionCount]. Each events[i] is [userId, timestamp, action, offerId]. All numeric values inside these lists are decimal strings, and action is either "redeem" or "unredeem".
Events are processed strictly in their input order, even when their timestamps are not sorted. A user starts with a redemption count of 0 for every offer. An event affects that count only when its timestamp:
Ask AI Assistant

Ask AI Assistant
Ask me anything about this coding question!
Test Cases
Input
Output
Expected