Trying all permutations

Posted by Malfist on Stack Overflow See other posts from Stack Overflow or by Malfist
Published on 2010-05-12T15:49:24Z Indexed on 2010/05/12 15:54 UTC
Read the original article Hit count: 132

Filed under:
|
|

For my program, I am trying to assist the user, and reduce his or her work load.

There are four input numbers. There is also an indeterminate amount of numbers they can be applied too.

For example, they four input numbers could be {4,7,3,2} and the numbers they can be applied to are {4,9,23}

The result should be: 4 (input) was applied to 4, leaving the sets looking like: {0,7,3,2} and then 7,2 (input) are applied to 9 leaving the sets looking like: {0,0,3,0} and {0,0,23} and because 3 or any other permutation including 3 does not match 23, 3 remains.

How would I do this?

© Stack Overflow or respective owner

Related posts about c#

Related posts about .net3.5