Smart way to generate permutation and combination of String

前端 未结 7 619
耶瑟儿~
耶瑟儿~ 2021-02-01 22:37
String database[] = {\'a\', \'b\', \'c\'};

I would like to generate the following strings sequence, based on given database.



        
7条回答
  •  遇见更好的自我
    2021-02-01 23:08

    Java implementation of your permutation generator:-

    public class Permutations {
    
    
        public static void permGen(char[] s,int i,int k,char[] buff) {
            if(i

提交回复
热议问题