@@ -0,0 +1,736 @@
+public class Name%7B%0A%09static void permute(String str, int l, int r)%0A    %7B%0A        if (l == r)%0A            System.out.println(str);%0A        else%0A        %7B%0A            for (int i = l; i %3C= r; i++)%0A            %7B%0A                str = swap(str,l,i);%0A                permute(str, l+1, r);%0A                str = swap(str,l,i);%0A            %7D%0A        %7D%0A    %7D%0A    static String swap(String a, int i, int j)%0A    %7B%0A        char temp;%0A        char%5B%5D charArray = a.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%09public static void main(String%5B%5D  args)%7B%0A%09%09String str = %22ALNMYT%22;%0A%09%09int length = str.length();%0A%09%09permute(str,0,length-1);%0A%09%7D%0A%7D

permutations of a string