Ad
  • Custom User Avatar

    Your solution does not solve the problem. It's not just about counting the characters, it's also about checking if the corresponding characters are in the same locations thorough the string. In your example, the strings are not isomorphic because one string cannot be turned into the other by changing every occurrence of one letter to another letter:

    a = "ABCBACCBA"
          |     |<---- Strings are not isomorphic, because B is paired with B in one place, and with A in another place. 
    b = "ABCBACCAB"