Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Added 787 in Java #69

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 1 commit into from
Nov 5, 2022
Merged

Added 787 in Java #69

merged 1 commit into from
Nov 5, 2022

Conversation

spattk
Copy link
Contributor

@spattk spattk commented Oct 28, 2022

No description provided.


return prices[dst] == Integer.MAX_VALUE ? -1 : prices[dst];
}
}
Copy link
Owner

Choose a reason for hiding this comment

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

Empty line at the end.

Copy link
Contributor Author

@spattk spattk Oct 30, 2022

Choose a reason for hiding this comment

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

Sorry, do you mean an empty line should be added as well?

Copy link
Owner

Choose a reason for hiding this comment

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

Yes. Otherwise, github will give you a mark in that file.

}

public void copyTempToPrice(int[] prices, int[] temp){
for(int i=0; i<prices.length; i++){
Copy link
Owner

Choose a reason for hiding this comment

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

Code style.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry, I didn't get this one too.
Do you mean to convert this to a for each loop or something else?

Copy link
Owner

Choose a reason for hiding this comment

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

Oh. My fault! This code style is also good.

@qiyuangong qiyuangong merged commit 67a8422 into qiyuangong:master Nov 5, 2022
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