← Questions
GPU clusters: capacity left per day and the best K-switch plan
0
I was asked this
No reports yet. Sign in to say where you were asked it.
You run a few GPU clusters with fixed daily capacities, for example [10, 20]. Each day a list of usage records takes GPUs from clusters (a record names the day, the cluster and how many GPUs), and every cluster is back to full capacity the next morning.
- Return, for each day, how many GPUs are left in every cluster (a list of lists, one row per day).
- A new workload may sit on any cluster each day and switch freely between days. What is the most GPU-days it can collect?
- Now it may switch clusters at most K times over the whole period. What is the most it can collect? Give the recurrence, then the time and space of your solution.
Parts 1 and 2 are warm-ups; most of the time belongs to part 3.
No official answer yet. Write yours on the right and run it.
Nothing published yet.
Sign in to submit your code; every attempt is kept here.
Write and test your solution herePython in your browser, the question's tests level by level, every submission kept for you.Sign in to start coding
