Search
⌘K

Leetcode 1882. Process Tasks Using Servers

Simulate assigning tasks that arrive each second to servers, always choosing the available server with the smallest weight (breaking ties by index) and, if none are free, waiting until the next server frees; this is typically implemented using two priority queues (available by weight/index and busy by free time) to produce the assigned-server index for each task.


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.