leetcode

Solution to some Leetcode problems written in C++
git clone git://git.dimitrijedobrota.com/leetcode.git
Log | Files | Refs | README | LICENSE

0389.cpp (246B)


0 class Solution {
1 public:
2 char findTheDifference(const string &s, const string &t) {
3 int sum = 0;
4 for (const char c : t)
5 sum += c;
6 for (const char c : s)
7 sum -= c;
8 return sum;
9 }
10 };