Actually i looking for the permutation for the number i
searching..
I found out the function of algorithm to generate
permutations frpm Wikipedia, but no idea how to apply in CF script?
http://en.wikipedia.org/wiki/Permutation
Algorithm to generate permutations
For every number k () this following algorithm generates the
corresponding permutation of the initial sequence :
function permutation(k, s) {
var int factorial:= 1;
for j= 2 to length(s) {
factorial:= factorial* (j-1); // factorial= (j-1)!
swap s[j- ((k / factorial) mod j)] with s
;
}
return s;
}