Company: Amazon_24oct
Difficulty: medium
Total Packing Efficiency Problem Description In the Amazon distribution center, there is a collection of n products, each with a distinct volume. The challenge is to evaluate the "packing efficiency" of the collection, aiming for proper utilization of space. More specifically, there is an array volumes , where volumes[i] represents the volume of the i th product. The "packing efficiency" of a subarray B = [products[l], products[l+1], ..., products[r]] is defined by the number of indices i that satisfy these conditions: l <= i <= r For every index j such that i < j <= r , volumes[i] > volumes[j] The total packing efficiency of the entire collection is calculated by summing the packing efficiency across all subarrays of a given size k . Given an array ' volumes ' of size ' n ' and an integer ' k ', compute the total packing efficiency of the collection. Complete the function findTotalEfficiency in the editor below. findTotalEfficiency has the following parameters: int volu