leetcodeSolution to some Leetcode problems written in C++ |
git clone git://git.dimitrijedobrota.com/leetcode.git |
Log | Files | Refs | README | LICENSE |
0371.cpp (202B)
0 class Solution { 1 public: 2 int getSum(int a, int b) { 3 unsigned c; 4 while (b) { 5 c = a & b; 6 a ^= b; 7 b = c << 1; 8 } 9 return a; 10 } 11 };