Algorithm · Circle · Medium
Problem: Scheduling User Quotas with Expiring Assignments (Level 3) Build a system that manages users and their task assignments. Requirements Create user: when a user is created, its quota specifies the greatest number of assignments it may have active concurrently. Assign a task: give a user a taskId together with the time interval [startTime, endTime). Rules An assignment is active precisely during the half-open interval [startTime, endTime). An assignment expires when…