I have a Map and I want to convert it to collection of list but condition is single list can contain indexes with sum of their value less than X . How to a