Skip to content
Advertisement

Tag: algorithm

All possible combinations of numbers with rounding error matching sum

I have encountered one problem that I struggle to solve. There is a group of numbers that should match some given sum and the function should output all possible combinations. The length of the input numbers differ, might be 3 or sometimes 20 numbers in the input array. Unfortunately, some numbers do have a rounding error and some do not

Advertisement