
Sponsored
Sponsored
Use these hints if you're stuck. Try solving on your own first.
To speed up the next available server search, keep track of the available servers in a sorted structure such as an ordered set.
To determine if a server is available, keep track of the end times for each task in a heap and add the server to the available set once the soonest task ending time is less than or equal to the next task to add.