Skip to content

add solution for 066 plus one - #76

Open
ghost wants to merge 1 commit into
masterfrom
066
Open

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

Conversation

@ghost

@ghost ghost commented Mar 19, 2016

Copy link
Copy Markdown

@kuangami please review

@kuangami

Copy link
Copy Markdown
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