Quote:
Originally posted by KevinHall
Who is to say that he meant ordered from least to greatest (or the other way around). Even 1+2+1 is in a particular order. I believe what he meant was that the order (or each permutation) counts.
- Kevin
P.S. As far as how to express it, yikes, that seems difficult. I would start off trying to find all combinations and then from the combinations it would be easy to find all permutations (there are several articles on Codeguru and Codeproject that outline how to iterate through permutations).
Actually, he didn't ask for ALL permutations (ordered or not