Let's say that I have a JSON file like at example below.
How would I go about finding all possible values of item combination time sums that exist between let's say 00:03:04 to 00:25:55 without finding every single permutation combination that exists and adding them for that set?
For example item 1 and item 3 would be found in that time constraint where their times add together to 00:20:32.
I have tried to use permutations, but you run into certain drawbacks with more objects. If I go up to 7 objects, it clearly takes me over 13,000 iterations of adding time values together and checking for range constraints.
What can I do to simplify the algorithm?
{
"item1":{"time":"00:18:21"},
"item2":{"time":"00:22:22"},
"item3":{"time":"00:02:11"},
"item4":{"time":"01:34:32"}
}