@@ -0,0 +1,1373 @@
+import java.util.Scanner;%0A%0A/**%0A * Created by aubdira on 10/30/17.%0A *%0A * String permutation in java Given a string %22ABC%22 OUTPUT ABC ACB BAC BCA CBA CAB%0A */%0Apublic class StringPermutation %7B%0A%0A    public static void main(String%5B%5D args) %7B%0A        Scanner scanner = new Scanner(System.in);%0A        System.out.println(%22Enter you string with out spaces: %22);%0A        String givenString = scanner.next();%0A        scanner.close();%0A%0A        System.out.println(%22The Permuted String:%22);%0A%0A        StringPermutation.permuteString(givenString, 0, givenString.length() - 1);%0A    %7D%0A%0A    /**%0A     * Permutation method%0A     *%0A     * @param str string to calculate permutation for%0A     * @param start starting index%0A     * @param end end index%0A     */%0A    private static void permuteString(String str, int start, int end) %7B%0A        if (start == end) %7B%0A            System.out.println(str);%0A        %7D else %7B%0A            for (int i = start; i %3C= end; i++) %7B%0A                str = swap(str, start, i);%0A                permuteString(str, start + 1, end);%0A                str = swap(str, start, i);%0A            %7D%0A        %7D%0A    %7D%0A%0A    private static String swap(String str, int i, int j) %7B%0A        char temp;%0A        char%5B%5D charArray = str.toCharArray();%0A        temp = charArray%5Bi%5D;%0A        charArray%5Bi%5D = charArray%5Bj%5D;%0A        charArray%5Bj%5D = temp;%0A        return String.valueOf(charArray);%0A    %7D%0A%0A%7D%0A%0A

Add StringPermutation.java to sort directory