Help needed finding combinations.

Hello. So I got task @ university what requires to find all possible combinations from 7 given 2 digit numbers, and that numbers can be flipped around.

Lets say this is numbers: 13 01 02 24 14 12 25

So from all these numbers I need to find all possible combination when numbers flip around, lets say this is couple possible combinations:

  • 13 01 02 24 14 12 25

  • 13 01 02 24 14 12 52

  • 13 01 02 24 14 21 25

  • 13 01 02 24 14 21 52

I tried doing some math how many combinations it would be, and I came up that it would be:

14 * 12 * 10 * 8 * 6 * 4 * 2 = 645 120

P.S. If we use number 13, we can not use him flipped in same combination.

by Mortelity via /r/csharp

Leave a Reply