Permutations by teebee(pooq)

void f(string a,string b=""){if(a=="")write(substr(b,1));for(int i;i<length(a);++i)f(erase(a,i,9)+substr(a,i+1),b+" "+substr(a,i,1));}f("012345");

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page