Isomorphic Strings
https://leetcode.com/problems/isomorphic-strings/ s と t をマッピングして考える。 この際、同じ文字なのに違う文字がマッピングされる場合 isomorphic にならない。 ex. foo bar | f → b | | o → a | | o → r | | b → f | | a → o | | r → o | o が a と r にマッピングされているので、 isomorphic にならず、false になる。 class Solution: def isIsomorphic(self, s: str, t: str) -> bool: mapST, mapTS = {}, {} for c1, c2 in zip(s, t): if((c1 in mapST and mapST[c1] !...