美文网首页
205. Isomorphic Strings

205. Isomorphic Strings

作者: 我是你的果果呀 | 来源:发表于2016-12-01 06:50 被阅读0次

    Given two stringssandt, determine if they are isomorphic.
    Two strings are isomorphic if the characters inscan be replaced to gett.
    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.

    For example,
    Given"egg","add", return true.
    Given"foo","bar", return false.
    Given"paper","title", return true.

    这题厉害了, 利用map.put()的返回值来确定是否规则一致, 看代码!

    相关文章

      网友评论

          本文标题:205. Isomorphic Strings

          本文链接:https://www.haomeiwen.com/subject/uqhxmttx.html