Skip to content

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

Merged
merged 5 commits into from
Jul 29, 2021
Merged

feat: add java solution to lc problem: No.1342 and No.1678 #537

merged 5 commits into from
Jul 29, 2021

Conversation

0xcaffebabe
Copy link
Member

@0xcaffebabe 0xcaffebabe commented Jul 29, 2021

feat: add java solution to lc problem: No.1342 and No.1678

@0xcaffebabe 0xcaffebabe changed the title feat: add java solution to lc problem: No.1342.Number of Steps to Red… feat: add java solution to lc problem: No.1342 Jul 29, 2021
@0xcaffebabe 0xcaffebabe changed the title feat: add java solution to lc problem: No.1342 feat: add java solution to lc problem: No.1342 and No.1678 Jul 29, 2021
@yanglbme
Copy link
Member

yanglbme commented Jul 29, 2021

Hi, @0xcaffebabe please add the solution to README.md, README_EN.md and Solution.java files

@yanglbme
Copy link
Member

@0xcaffebabe
Copy link
Member Author

@yanglbme got it

@yanglbme
Copy link
Member

please format your code before a commit

class Solution {
public int numberOfSteps(int num) {
int cnt = 0;
while(num != 0) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
while(num != 0) {
while (num != 0) {

class Solution {
public int numberOfSteps(int num) {
int cnt = 0;
while(num != 0) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
while(num != 0) {
while (num != 0) {

class Solution {
public int numberOfSteps(int num) {
int cnt = 0;
while(num != 0) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
while(num != 0) {
while (num != 0) {

Comment on lines 70 to 71
int p = 0,q = 1;
for(;p<command.length();p++,q++){
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
int p = 0,q = 1;
for(;p<command.length();p++,q++){
int p = 0, q = 1;
for (; p < command.length(); p++, q++) {

Comment on lines 63 to 64
int p = 0,q = 1;
for(;p<command.length();p++,q++){
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
int p = 0,q = 1;
for(;p<command.length();p++,q++){
int p = 0, q = 1;
for (; p < command.length(); p++, q++) {

Comment on lines 4 to 5
int p = 0,q = 1;
for(;p<command.length();p++,q++){
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
int p = 0,q = 1;
for(;p<command.length();p++,q++){
int p = 0, q = 1;
for (; p < command.length(); p++, q++) {

@0xcaffebabe 0xcaffebabe requested a review from yanglbme July 29, 2021 03:34
@yanglbme yanglbme merged commit 657ba5f into doocs:main Jul 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants