Sum of Two Integers Solutions in GoNumber 371Difficulty MediumAcceptance 50.7%Link LeetCodeOther languages C++SolutionsGo solution by halfrost/LeetCode-Gopackage leetcode func getSum(a int, b int) int { if a == 0 { return b } if b == 0 { return a } // (a & b)<<1 计算的是进位 // a ^ b 计算的是不带进位的加法 return getSum((a&b)<<1, a^b)}package leetcode func getSum(a int, b int) int { if a == 0 { return b } if b == 0 { return a } // (a & b)<<1 计算的是进位 // a ^ b 计算的是不带进位的加法 return getSum((a&b)<<1, a^b) }