Back to problems

Maximize Prime Item Inventory

SQL · Amazon · Medium

Problem You are given a table named inventory that describes items to be stored in a 500,000 square foot warehouse. Amazon wants to maximize how many items can be placed inside by following a specific rule: prime-eligible items get priority. Items are stored in complete batches. A single batch for a given item_type contains exactly one unit of every distinct item of that type. The warehouse must be filled by first packing in as many full prime_eligible batches as possible.…

Checking your access…