public class Solution { public int Add(int num1,int num2) { while(num2 != 0) { int n1 = num1; int n2 = num2; num1 = n1 ^ n2; num2 = (n1 & n2) << 1; }
return num1;
}
}
public class Solution { public int Add(int num1,int num2) { while(num2 != 0) { int n1 = num1; int n2 = num2; num1 = n1 ^ n2; num2 = (n1 & n2) << 1; }
return num1;
}
}