@mingik Hi, what if a and b are quite large? This solution seems not that efficient.
F
fujiaozhu
@fujiaozhu
4
Reputation
35
Posts
3146
Profile views
7
Followers
1
Following
Posts made by fujiaozhu

RE: Sum of Two Integers

RE: Sum of Two Integers
@4abf Hi, have a look at this https://leetcode.com/discuss/111582/javasimpleeasyunderstandsolutionwithexplanation, hope you can understand it.

RE: Sum of Two Integers
@GoGoDong Yes, we can add two integers each time a bit, but we can also consider that what do we do when adding two decimal integers using the operator +, for example 14 + 16, we can separate the sum into 2 parts(steps), 20 + 10, 20 corresponding to 1 + 1 (= 2) and 4 + 6 (= 0), 10 corresponding to 4 + 6 (=10)...so 14 + 16 becomes a new problem 20 + 10...

Sum of Two Integers
Calculate the sum of two integers, but you are not allowed to use the operator
+
and
.Example:
Given [1, 2], return 3.