Get Smaller Items
Problem Overview
- For each query value, count how many items picked across all orders have values strictly less than that query.
- Inputs: items[n], start[m], end[m] (inclusive 0-indexed ranges), and query[q]; Output: long output[q] counts.
- Context: Amazon fulfillment center selecting item ranges from a warehouse array.
- Constraints: n, m, q up to 1e5; item and query values up to 1e9.
- An Amazon interviews coding interview problem and interview question.
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:
