java string permutations and combinations lookup

后端 未结 6 559
北恋
北恋 2021-01-02 08:35

I\'m writing an Android word app. My code includes a method that would find all combinations of the string and the substrings of a 7 letter string with a minimum of

6条回答
  •  無奈伤痛
    2021-01-02 09:01

      static List permutations(String a) {
        List result=new LinkedList();
        int len = a.length();
        if (len<=1){
          result.add(a);
        }else{
          for (int i=0;i

提交回复
热议问题