@@ -0,0 +1,1826 @@
+/**%0A *%09Given two strings s and t, determine if they are isomorphic.%0A *%0A *%09Two strings are isomorphic if the characters in s can be replaced to get t.%0A *%0A *%09All occurrences of a character must be replaced with another character while %0A *%09preserving the order of characters. No two characters may map to the same character but a character may map to itself.%0A *%0A *%09For example,%0A *%09Given %22egg%22, %22add%22, return true.%0A *%0A *%09Given %22foo%22, %22bar%22, return false.%0A *%0A *%09Given %22paper%22, %22title%22, return true.%0A *%0A * %09Note:%0A *%09You may assume both s and t have the same length.%0A *%0A *%09Author: matao%0A *%0A */%0A%0Aimport java.util.Map;%0Aimport java.util.HashMap;%0A%0Apublic class IsomorphicStrings %7B%0A%09public static boolean isIsomorphic(String s, String t) %7B%0A        if(s.length() != t.length()) %7B%0A        %09return false;%0A        %7D%0A        if((s.length() == 1) && (s.charAt(0) != t.charAt(0))) %7B%0A        %09return false;%0A        %7D%0A        Map%3CCharacter, Character%3E map = new HashMap%3CCharacter, Character%3E();%0A        for (int i = 0; i %3C s.length(); i++) %7B%0A        %09if (map.get(s.charAt(i)) == null) %7B%0A        %09%09map.put(s.charAt(i), t.charAt(i));%0A        %09%7D%0A        %09if(map.get(s.charAt(i)) != t.charAt(i)) %7B%0A        %09%09return false;%0A        %09%7D%0A        %7D%0A        map.clear();%0A        for (int i = 0; i %3C s.length(); i++) %7B%0A        %09if (map.get(t.charAt(i)) == null) %7B%0A        %09%09map.put(t.charAt(i), s.charAt(i));%0A        %09%7D%0A        %09if(map.get(t.charAt(i)) != s.charAt(i)) %7B%0A        %09%09return false;%0A        %09%7D%0A        %7D%0A        return true;%0A    %7D%0A%0A    public static void main(String%5B%5D args) %7B%0A    %09System.out.println(isIsomorphic(%22paper%22, %22title%22));%0A    %09System.out.println(isIsomorphic(%22foo%22, %22bar%22));%0A    %09System.out.println(isIsomorphic(%22egg%22, %22add%22));%0A    %09System.out.println(isIsomorphic(%22e%22, %22a%22));%0A    %09System.out.println(isIsomorphic(%22ab%22, %22aa%22));%0A    %7D%0A%7D

add Isomorphic Strings solution