Maximize Revenue from VM Inventory

You are given the current inventory array inventory for n VM types. If a VM type currently has s units in stock, selling one unit produces revenue s; its stock then decreases to s - 1.

Ther...

Example

Unlock to view complete problem details

and practice with sample input/output

Was this article helpful?

View Test Cases & Run Code requires membership

Standard Input
Execution Result: