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

php - Creating canonical URLs with custom route-classes -

Mysql Local server hardware -

mysql - Formatting problem with PHP DateTime Difference when used as part of an equation -