389. Find the Difference
来源:互联网 发布:淘宝联盟定向推广理由 编辑:程序博客网 时间:2024/06/15 12:31
class Solution {public: char findTheDifference(string s, string t) { map<char,int> tm; map<char,int> sm; for(int i=0;i<t.size();i++) tm[t[i]]++; for(int i=0;i<s.size();i++) sm[s[i]]++; for(map<char,int>::iterator it=tm.begin();it!=tm.end();it++) { if (sm[it->first] == 0 || sm[it->first] != it->second) return it->first; } return ' '; }};
1 0
- 389. Find the Difference
- 389. Find the Difference
- 389. Find the Difference
- 389. Find the Difference
- 389. Find the Difference
- 389. Find the Difference
- 389. Find the Difference
- 389. Find the Difference
- 389. Find the Difference
- 389. Find the Difference*
- 389. Find the Difference
- 389. Find the Difference
- 389. Find the Difference
- 389. Find the Difference
- 389. Find the Difference
- 389. Find the Difference
- 389. Find the Difference
- 389. Find the Difference
- 初窥Linux 之 我最常用的20条命令
- AngularJS下拉框的高级应用
- 【课堂】【基本的算术表达式】
- java线程总结-1
- 64位Windows系统下32位应用程序连接MySql
- 389. Find the Difference
- JavaScript引用类型(Array 类型)
- Codeforces Round #386(Div.2) 17-1-8
- 清华EMBA课程系列思考之十五 -- 企业绩效管理 -- 战略性绩效管理
- LDD3源码分析之阻塞型I/O
- 连续第九十九天
- about recommender system
- MapReduce任务无法在8088页面查看
- CSDN博客第一名竟然是由一个Python程序刷出来的?