标签:sum integer int style gets div src sign png
不断更新值和进位。
class Solution { public: int getSum(int a, int b) { return b == 0 ? a : getSum(a ^ b, ((unsigned int)a & b) << 1); } };
LeetCode 371. 两整数之和 Sum of Two Integers
标签:sum integer int style gets div src sign png
原文地址:https://www.cnblogs.com/ZSY-blog/p/12990209.html