What is an elegant way to find all the permutations of a string. E.g. permutation for ba, would be ba and ab, but what about longer st
ba
ab
Permutation of String:
public static void main(String args[]) { permu(0,"ABCD"); } static void permu(int fixed,String s) { char[] chr=s.toCharArray(); if(fixed==s.length()) System.out.println(s); for(int i=fixed;i