find Lowest Cost Arrangement
Create an arrangement for all possible permutations for smallCounts and
largeCounts, fit each into the available space, and return the arrangement with the lowest cost.
Keep in mind that the returned arrangements do not take into account the available space from the carousel. They will all occupy varying degrees of more or less space. The caller needs to handle sorting the returned list, picking the most desirable arrangement, and fitting the arrangement to the size of the carousel.
Return
the arrangement that is considered the most desirable and has been adjusted to fit within the available space
Parameters
the space the arrangement needs to fit
the size small items would like to be
the minimum size small items are allowed to be
the maximum size small items are allowed to be
an array of small item counts for a valid arrangement ordered by priority
the size medium items would like to be
an array of medium item counts for a valid arrangement ordered by priority
the size large items would like to be
an array of large item counts for a valid arrangement ordered by priority