Maximum Strictly-Increasing Unique Batches

Asked at Amazon · Coding Questions · Difficulty: Medium

`inventory[i]` is the count of product type `i`. Pack batches where each batch uses **distinct** product types (each once) and each batch has strictly more items than the previous. Each item is used at most once. Return the maximum number of batches.

Loading the problem…