Classifying list of numbers

Hi there, i got a mathematical issue for classifying numbers.
I got a list with a bunch of numbers, and i would like to clusterize them into sets in which the mass addition is never larger than 250…

Any ideas ?

Thanks per advance !

Hi! Does this thread help?

Whooah perfect, Thanks for your help !!
@Laurent Delrieu , such a star ^^