Skip to content

add solution for 066 plus one#76

Open
ghost wants to merge 1 commit intomasterfrom
066
Open

add solution for 066 plus one#76
ghost wants to merge 1 commit intomasterfrom
066

Conversation

@ghost
Copy link

@ghost ghost commented Mar 19, 2016

@kuangami please review

@kuangami
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants