Possible Duplicates:
Display possible combinations of string
algorithm that will take numbers or words and find all possible combinations
If I have 3 strings, such as:
"abc def xyz"
And I want to find the max number of combinations I can generate by rearranging these strings, e.g:
- abc xyz def
- def xyz abc
- xyz abc def
etc. What's the formula/algorithm for calculating this?