The Wayback Machine - https://web.archive.org/web/20200802190130/https://github.com/kdn251/interviews/pull/148
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

Update AddDigits.java #148

Open
wants to merge 1 commit into
base: master
from
Open

Update AddDigits.java #148

wants to merge 1 commit into from

Conversation

@vineet1020
Copy link

vineet1020 commented Oct 30, 2019

Solved problem in O(1) time complexity without loops.

Solved problem in O(1) time complexity without loops.
}
num = temp;
}
if(n==0)

This comment has been minimized.

Copy link
@maheshwarigagan

maheshwarigagan Feb 27, 2020

This code won't compile, variable n should be declared first.

return 9;
else
return n%9;
Comment on lines +14 to +16

This comment has been minimized.

Copy link
@maheshwarigagan

maheshwarigagan Feb 27, 2020

Formatting issue, please format.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants
You can’t perform that action at this time.