-
389. Find the Difference릿코드(LEETCODE) 2020. 2. 13. 12:38반응형
https://leetcode.com/problems/find-the-difference/
키워드 - bitwise operation
Source
class Solution { public: char findTheDifference(string s, string t) { char sol = 0; for(char c: s + t) sol ^= c; return sol; } };
반응형'릿코드(LEETCODE)' 카테고리의 다른 글
342. Power of Four (0) 2020.02.13 1290. Convert Binary Number in a Linked List to Integer (0) 2020.02.13 136. Single Number (0) 2020.02.13 268. Missing Number (0) 2020.02.13 1342. Number of Steps to Reduce a Number to Zero (0) 2020.02.13