Displaying 1 result from an estimated 1 matches for "case_insensitive_order".
2008 Apr 06
3
Multiset Permutations
...static int Factorial(int n){
int fact = 1;
for(int i=2; i<=n; i++){
fact *= i;
}
return fact;
}
public static void main(String[] args){
char[] set = new char[]{'A', 'A', 'B', 'C'};
String[] perms = GetPermutations(set);
Arrays.sort(perms, String.CASE_INSENSITIVE_ORDER);
for(int i=0; i<perms.length; i++){
System.out.println(perms[i]);
}
}
}
------------------------- END JAVA CODE -----------------------------
This code prints the following:
AABC
AACB
ABAC
ABCA
ACAB
ACBA
BAAC
BACA
BCAA
CAAB
CABA
CBAA
--
View this message in context: http://www.nabb...