About Shipping
A shop has $n$ types of items, where the quantity of the $i^{\text{th}}$ item is denoted by quantity[i]. These items are to be shipped in two consignments:
The first consignment contains items $[1, 2, \dots, j]$
The second consignment contains the remaining items $[j+1, \dots, n]$