Permutations of a string

前端 未结 4 1954
遥遥无期
遥遥无期 2021-01-28 21:03
public class Permute {
    public static void main(String[] args) throws IOException {
        System.out.println(\"Enter a string\");
        BufferedReader bufReader =         


        
4条回答
  •  北荒
    北荒 (楼主)
    2021-01-28 21:42

    Try change your shuffle:

    public static void shuffle(String dummy, String input){
        if(input.length() <= 1)
            System.out.println(dummy+input);
        else{
            for(int i=0; i 

提交回复
热议问题