Horizontal Pod Autoscaler
Problem Overview
- Compute final pod counts for micro-services after applying autoscaler event logs.
- Input: pods[n] initial counts; logs[m][3] with events [1,p,x] set service p to x, [2,-1,x] set all with pods < x to x.
- Output: int[n] final pod count per service.
- Context: Kubernetes HPA and micro-services scaling; from Rubrik interviews; a coding interview interview question problem.
Example
Unlock to view complete problem details
and practice with sample input/output
Was this article helpful?
View Test Cases & Run Code requires membership
Input Variables
Execution Result:
