Company: Salesforce_17feb
Difficulty: medium
Storage Request Problem Description Given an array of integers, storage of size n , each storage[i] represents the amount of cloud storage requested by a Salesforce Cloud Service customer i . There are n customer requests in a customer line in increasing order. A customer can request at most k storage units at one time. Return an array of customer numbers in the order in which they have completed the request for their needed amount of storage. Call the amount of storage a customer has already requested current , and the storage required by that customer total . Repeat the following process until the line is empty: If total - current <= k request ( total - current ) leave the line store the customer's i in the return array Otherwise request k current = current + k (update the customer's cumulative withdrawn amount) move to the back of the line Function Description Complete the function getFinalOrder in the editor below. The function is expected