Company: Amazon_6july
Difficulty: medium
countLowerValueItems Problem Description An Amazon fulfillment center receives a large number of orders each day. Each order is associated with a range of prices of items that need to be picked from the warehouse and packed into a box. There are n items in the warehouse, which are represented as an array items[n] . The value of items[i] represents the value of the i th item in the warehouse, and subsequently there are m orders. The start_index and end_index for the k th order are represented in the arrays startIndex[i] and endIndex[i] . Also startIndex[i] and endIndex[i] are 0-index based. For each order, all the items are picked from the inclusive range from startIndex[i] through endIndex[i] . Given array items , startIndex , endIndex , and query . For each query[j] , find the count of elements in the range with a value strictly less than query[j] . Function Description Complete the function countLowerValueItems in the editor below. countLowerValueItems has the following parameter(s):