Leetcode in Java && Oracle
422 subscribers
8 photos
397 files
400 links
Second channel: @codeforces_java

Let's Develop Together!
Download Telegram
image_2022-02-07_22-07-57.png
27.1 KB
#N389. Find the Difference
problem link

#solution
class Solution {
public char findTheDifference(String s, String t) {
int n = s.length();
char ch=t.charAt(n);
for(int i=0; i<n; i++){
ch ^= s.charAt(i);
ch ^= t.charAt(i);
}

return ch;
}
}
👍1🔥1