String database[] = {\'a\', \'b\', \'c\'};
I would like to generate the following strings sequence, based on given database.
database
Java implementation of your permutation generator:-
public class Permutations { public static void permGen(char[] s,int i,int k,char[] buff) { if(i