permutation - Static sized combinations -


Hours and I can not come up with a solution.

Let's say I have ABC, I need all its 3 letter combinations, ABC, BBC, CBC etc. Now no ABC etc. Can it be done only with the loop? Any recursion or methods?

 for  (char ch1 = 'a'; ch1 & lt; = 'c' ; C3 and LT; = 'C'; C3 ++) for (four CH 2 = 'A'; C2 and LT; = 'C'; C2 ++)    

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -