Find the Difference
来源:互联网 发布:九堡做淘宝的在哪 编辑:程序博客网 时间:2024/06/05 19:26
妈呀又是神奇的异或……虽然哈希也可以,然而跟异或比起来就不值一提了……
class Solution {public: char findTheDifference(string s, string t) { char r=0; for(auto c:s) r^=c; for(auto c:t) r^=c; return r; }};
0 0
- 389. Find the Difference
- 389. Find the Difference
- 389. Find the Difference
- 389. Find the Difference
- Find the Difference
- 160.Find the Difference
- LeetCode389. Find the Difference
- Find the Difference
- 389. Find the Difference
- Leetcode:Find the Difference
- leetcode_389 Find the Difference
- 389. Find the Difference
- 389. Find the Difference
- Find the Difference --LeetCode
- [389]Find the Difference
- 389. Find the Difference
- LeetCode Find the Difference
- Find the Difference
- class占用内存问题
- iOS代码混淆总结
- java---maven项目的创建和导出
- C#中集合里面放集合的细节问题
- Linux环境下nodejs的安装图文教程
- Find the Difference
- 算法设计与分析HW3:LeetCode3
- startService启动过程分析
- hdu 5938 Four Operations(模拟)
- Python中的None与 NULL(即空字符)的区别
- [译]Android注解--@hide
- 异常:java.lang.NoClassDefFoundError: net/sf/ezmorph/Morpher 解决办法
- c++第二次作业-百钱百鸡问题
- 开发环境搭建---交叉工具链、makefile编写、连接器脚本、Eclipse调试