Find the Difference LeetCode solution in C++

1
class Solution {
2
public:
3
char findTheDifference(string s, string t) {
4
char c = 0;
5
for (char cs : s) c ^= cs;
6
for (char ct : t) c ^= ct;
7
return c;
8
}
9
};

0

WPM •0 •0

100%

ACC •0 •0

0s

TIME •0