You are given an integer array inventory, where inventory[i] represents the initial number of balls of the orders, representing the total number of balls to sell.
The value of each ball depends on the number of remaining balls of that color. Specifically, selling a ball of a color that currently has
Return the maximum total value that can be achieved after selling orders balls. Since the answer may be large, return it modulo
Constraints:
inventory.length
inventory[i]
orders inventory[i]
You are given an integer array inventory, where inventory[i] represents the initial number of balls of the orders, representing the total number of balls to sell.
The value of each ball depends on the number of remaining balls of that color. Specifically, selling a ball of a color that currently has
Return the maximum total value that can be achieved after selling orders balls. Since the answer may be large, return it modulo
Constraints:
inventory.length
inventory[i]
orders inventory[i]