title: isomorphic python algorithms
body: <p>Question:
  Given two strings s and t, determine if they are isomorphic.</p>
  
  <p>Two strings are isomorphic if the characters in s can be replaced to get t.</p>
  
  <p>All occurrences of a character must be replaced with another character while preserving the order of characters. No two characters may map to the same character but a character may map to itself.</p>
  
  <p>My code:</p>
  
  <pre><code>def isIsomorphic(self, s, t):
      # write your code here
      remap = dict()
      if s == t:
          return True
      if len(s) !=  len(t):
          return False
      for i in range(len(s)):
          if s[i] not in remap.keys() and t[i] in remap.values():
              return False
          elif s[i] not in remap.keys():
              remap[s[i]] = t[i]
          else:
              if remap[s[i]] != t[i]:
                  return False
      return True   
  </code></pre>
  
  <p>error hint:
     Your code ran too much time than we expected. Check your time complexity. Time limit exceeded usually caused by infinite loop if your time complexity is the best.</p>
  
  <p>Pls ask how i improve my code        </p>