Are you searching for combinations or permutations?
This looks like permutations: 123,132,231,213,312,321
What code have you tried?
Type: Posts; User: Norm
Are you searching for combinations or permutations?
This looks like permutations: 123,132,231,213,312,321
What code have you tried?
What did google say? It usually has algorithms for common problems like this one.
I think you are asking for:
number of permutations of n distinct objects is n×(n − 1)×(n − 2)×⋯×2×1, which is commonly denoted as "n factorial" and written "n!".
Would this do it:
Use all digits one at a time in first position
use remaining digits one at a time in next position
etc until no digits left
What have you tried?