Skip to content

Added java solution for 11_Container With Most Water #124

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

Conversation

sahariardev
Copy link
Contributor

No description provided.

@sahariardev
Copy link
Contributor Author

Solves issue number 123

Copy link
Owner

@Tahanima Tahanima left a comment

Choose a reason for hiding this comment

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

Hi @sahariardev
Your pr looks good. Just resolve the comments and rename the folder to 11_ContainerWithMostWater and your pr will be good to go!


int maxArea = Integer.MIN_VALUE;

while(i < j) {
Copy link
Owner

Choose a reason for hiding this comment

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

add a space after while, i.e while (i < j) {


maxArea = Math.max(maxArea, h*width);

if(height[i] > height[j]) {
Copy link
Owner

Choose a reason for hiding this comment

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

add a space after if, i.e if (height[i] > height[j]) {

}

return maxArea;

Copy link
Owner

Choose a reason for hiding this comment

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

remove the extra blank line

@Tahanima Tahanima merged commit 55ff889 into Tahanima:main Jun 27, 2023
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