标签:
Fun with bits - carries etc.
class Solution { public: int getSum(int a, int b) { if(!b) return a; return getSum(a ^ b, (a & b) << 1); } };
LeetCode "Sum of Two Integers"
原文地址:http://www.cnblogs.com/tonix/p/5648699.html