Hi,
I would like to generate all permutations of the numbers 1 to 26 that add up to a sum value, but limited to a certain series.
For example, if I input the sum value of 40 with the series of 4, it should display permutations of the numbers 1 to 26 such as:
1+1+12+26
1+1+13+25
1+1+14+24
Etc...
I would like the permutation series to go only in ascending sequence from left to right so that the same series of numbers do not repeat itself.
For e.g. 1+1+12+26 is essentially the same as...
Generate all permutations of a group of numbers that add up to a sum?
from Programming https://ift.tt/33pYzji
via IFTTT
0 Comments