Company: Factset_9oct
Difficulty: medium
Weird Pod Count Problem Description A cluster runs n microservices. Microservice i currently has pods[i] running pods. The cluster is healthy only when no two microservices have the same number of running pods. The only allowed operation is to pick a microservice i and start one more pod for it, which raises pods[i] by exactly 1 and costs cost[i] . The same microservice may be picked any number of times, and each pick is paid separately. Pod counts can never be lowered, and there is no upper limit on a pod count. Find the minimum total cost needed to make all n pod counts pairwise distinct. Complete the function getMinCost with the following parameters: pods : array of n integers, pods[i] is the number of running pods of microservice i cost : array of n integers, cost[i] is the price of one extra pod for microservice i It returns the minimum possible total cost as a 64-bit integer. Input Format The first line contains an integer n , the number of microservices. Each of the next n lines