# Filler Algorithm

I am curious to know if there is an algorithm that, given an array of decimals and integers, and given an integer, returns a sequence in descending order, composed of those numbers of the input array whose sum is as close as possible to the number of input, or even be identical, but not greater.

I wonder if there is something similar, and I wonder if it also has a name, this algorithm.

• It would help comprehension if you give actual names to the algorithm's parameters (even if it is just $k$, $m$, $n$, etc.). – dkaeae Aug 26 at 11:56
• In practice, @DeBunkeD's answer was what I was looking for... – Guglielmo Lischi Aug 27 at 6:22