Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add solution for 066 plus one #76

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

add solution for 066 plus one #76

wants to merge 1 commit into from

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.

None yet

2 participants