@@ -0,0 +1,1016 @@
+/*%0A%09Given two strings, write a method to decide if one is a permutation of the other%0A*/%0Aimport java.util.Arrays;%0A%0Apublic class question %7B%0A%0A%09public static void main(String%5B%5D args) %7B%0A%09%09System.out.println(question.isPermutation(%22dog%22, %22god%22));%0A        %0A%09%09System.out.println(question.isPermutation(%22dog %22, %22god%22));%0A%09%7D%0A    %0A    /**%0A    * Check if one string is a permutation of the other. This method ignores%0A    * case and counts whitespaces as character%0A    */%0A    public static boolean isPermutation(String str1, String str2) %7B%0A        // Change the strings to char arrays%0A        char%5B%5D array1 = str1.toLowerCase().toCharArray();%0A        char%5B%5D array2 = str2.toLowerCase().toCharArray();%0A        %0A        // Sort the arrays%0A        Arrays.sort(array1);%0A        Arrays.sort(array2);%0A        %0A        // Create strings from the arrays%0A        String word1 = new String(array1);%0A        String word2 = new String(array2);%0A        %0A        // Return if the are equal or not%0A        return word1.equals(word2);%0A    %7D%0A%0A%7D%0A%09%0A

Done with question 1.3