1
For example, make A, B, and C switch places with each other, and then define how many and all exchanges. ABC, ACB, BAC, BCA, CAB, CBA, etc. I want to do this with for and prefer Javascript, but it doesn’t have to be in it, it can be in PHP, C++, Java, etc.
NOTE: What I want to create is an RGB frame. That is, it has to have 3 variables, from 0 to 255.
A, B and C are integer? Are there always three elements? If yes, what would be the problem in simply always returning a fixed list with ABC, ACB, BAC, BCA, CAB and CBA?
– Victor Stafusa
http://stackoverflow.com/questions/2617055/how-to-generate-all-permutations-of-a-string-in-php
– Daniel Omine
Thank you Daniel
– Pedro Gabriel