[2008] Need help on permutatoin
Hi
I am looking for trifecta permutation combination code.
I mean if i give any number like 1 5 6 or 8 9 7 4 3
the program should print all possible combination in trifecta format
so if i give 3 numbers it should print 6 combinatin if i give 4 numbers it should give 24 combination n so on.
Please help
Thanks
Re: [2008] Need help on permutatoin
Re: [2008] Need help on permutatoin
I had a function built for this specific purpose, when Vista Ultimate went up 2 weeks ago, I lost it - backup hadnt been working.
Anywhoodles, the gist of it is that you have to break the string down into a string (or char) array (this forgoes the need to see how long the string is). Then use for loops (yes there will be more than one) to run through your string.
Put the results in a List(Of String) and make sure to check for duplicates BEFORE you add them, because if you have a string that contains the same digit more than once, you WILL get duplicates. If that really does not matter in your results then don't worry about it.
Hopefully that points you in the right direction...... :o
D