LeetCode-Sol-Res icon indicating copy to clipboard operation
LeetCode-Sol-Res copied to clipboard

add solution for 066 plus one

Open ghost opened this issue 8 years ago • 1 comments

@kuangami please review

ghost avatar Mar 19 '16 15:03 ghost

Could you please fix the tab issue?

Actually this line

result.insert(result.begin(), carry);

can be improved using

result[0] = 1; result.push_back(0);

because the only case it will need one more digit is all nines. Using push_back will save time.

kuangami avatar Mar 24 '16 02:03 kuangami