slove this problems in java


  • 0
    5

    class Solution {
    public int getSum(int a, int b) {
    if(b==0) return a;
    int sum=a^b;
    int carray=(a&b)<<1;
    return getSum(sum,carray);

    }
    

    }


Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.