-
-
Notifications
You must be signed in to change notification settings - Fork 9.1k
feat: add java solution to lc problem: No.1342 and No.1678 #537
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
Conversation
…uce a Number to Zero
Hi, @0xcaffebabe please add the solution to README.md, README_EN.md and Solution.java files |
@yanglbme got it |
please format your code before a commit |
class Solution { | ||
public int numberOfSteps(int num) { | ||
int cnt = 0; | ||
while(num != 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
while(num != 0) { | |
while (num != 0) { |
class Solution { | ||
public int numberOfSteps(int num) { | ||
int cnt = 0; | ||
while(num != 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
while(num != 0) { | |
while (num != 0) { |
class Solution { | ||
public int numberOfSteps(int num) { | ||
int cnt = 0; | ||
while(num != 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
while(num != 0) { | |
while (num != 0) { |
int p = 0,q = 1; | ||
for(;p<command.length();p++,q++){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
int p = 0,q = 1; | |
for(;p<command.length();p++,q++){ | |
int p = 0, q = 1; | |
for (; p < command.length(); p++, q++) { |
int p = 0,q = 1; | ||
for(;p<command.length();p++,q++){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
int p = 0,q = 1; | |
for(;p<command.length();p++,q++){ | |
int p = 0, q = 1; | |
for (; p < command.length(); p++, q++) { |
int p = 0,q = 1; | ||
for(;p<command.length();p++,q++){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
int p = 0,q = 1; | |
for(;p<command.length();p++,q++){ | |
int p = 0, q = 1; | |
for (; p < command.length(); p++, q++) { |
feat: add java solution to lc problem: No.1342 and No.1678