LeetCode 205. Isomorphic Strings
来源:互联网 发布:手机网购比价软件 编辑:程序博客网 时间:2024/05/23 15:08
public class Solution { public boolean isIsomorphic(String s, String t) { if (s.length() == 0) return true; Map<Character, Character> map = new HashMap<Character, Character>(); for (int i = 0; i < s.length(); i++) { char cs = s.charAt(i); char ct = t.charAt(i); if (map.containsKey(cs)) { if (map.get(cs) != ct) return false; } else if (map.containsValue(ct)) return false; else map.put(cs, ct); } return true; }}
0 0
- 【LeetCode】205.Isomorphic Strings
- [leetcode] 205.Isomorphic Strings
- LeetCode 205. Isomorphic Strings
- 205. Isomorphic Strings LeetCode
- 【LeetCode】205. Isomorphic Strings
- LeetCode *** 205. Isomorphic Strings
- leetcode 205. Isomorphic Strings
- LeetCode 205. Isomorphic Strings
- LeetCode 205. Isomorphic Strings
- leetcode-205. Isomorphic Strings
- LeetCode-205.Isomorphic Strings
- leetcode 205. Isomorphic Strings
- [leetcode] 205. Isomorphic Strings
- 205.[Leetcode]Isomorphic Strings
- leetcode 205. Isomorphic Strings
- 【leetcode】205. Isomorphic Strings
- [Leetcode]205. Isomorphic Strings
- LeetCode - 205. Isomorphic Strings
- CUDA 8.0 + VS2013 + win7 x64开发环境搭建
- 让IE8能够响应媒体查询
- 并行计算机未来发展前景
- 数据结构实验:连通分量个数
- UNDO数据管理
- LeetCode 205. Isomorphic Strings
- 2016找工作面试
- Unity&Shader案例篇—绘制雨滴
- Java--基础(二)语法
- 递归
- 64-bit mex files using sparse matrices must be rebuilt with the "-largeArrayDims" option.
- maven 依赖传递,修改默认jdk1.5
- 小感慨
- leetcode(45).172. Factorial Trailing Zeroes