Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Solution {
- public:
- char findTheDifference(string &s, string &t) {
- int f = 0;
- int n = 0;
- for (int i = 0; i < s.size(); ++i) {
- f += s[i];
- n += t[i];
- }
- n += t[t.size() - 1];
- return n - f;
- }
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement