Isomorphic Strings
来源:互联网 发布:08奥运会韦德数据 编辑:程序博客网 时间:2024/06/13 22:27
哈希表,哈希的思想,不一定都要用unordered_map的....
class Solution {public: bool isIsomorphic(string s, string t) { int Se[256]={0}; int Te[256]={0}; int n=s.length(); for(int i=0;i<n;i++) { if(Se[s[i]]!=Te[t[i]]) return false; Se[s[i]]=i+1; Te[t[i]]=i+1; } return true; }};
0 0
- Isomorphic Strings
- Isomorphic Strings
- Isomorphic Strings
- Isomorphic Strings
- Isomorphic Strings
- Isomorphic Strings
- Isomorphic Strings
- Isomorphic Strings
- Isomorphic Strings
- Isomorphic Strings
- Isomorphic Strings
- Isomorphic Strings
- Isomorphic Strings
- Isomorphic Strings
- Isomorphic Strings
- Isomorphic Strings
- Isomorphic Strings
- Isomorphic Strings
- Java解析XML之导入dom4j
- 深度学习资料
- Atitti cto的日常流程与职责attilax总结
- 走进 Redis 的世界
- Android widget 组件(一) Button、 EditText、 TextView
- Isomorphic Strings
- Smallest Rectangle Enclosing Black Pixels
- 【Java学习】——SSH总结
- Atitit 我们的devops战略与规划 规范 推荐标准
- 第三方登录
- CSS中行内元素和块级元素区别
- 比酒量
- MySQL无法重启问题解决Warning: World-writable config file ‘/etc/my.cnf’ is ignored
- VGG:VERY DEEP CONVOLUTIONAL NETWORKS FOR LARGE-SCALE IMAGE RECOGNITION译文