Skip to content

refactor: Refactored calculateMaxOfMin() (#5) #2957

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

Closed

Conversation

chubretovic
Copy link

Refactored the function calcultateMaxOfMin form the class MaximinumMinimumWindow.

</project>
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
</project>
</project>

Copy link
Member

@siriak siriak left a comment

Choose a reason for hiding this comment

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

Looks good, only a couple of comments

Comment on lines 75 to +78
int[] arr = new int[]{10, 20, 30, 50, 10, 70, 30};
int[] target = new int[]{70, 30, 20, 10, 10, 10, 10};
int[] res = calculateMaxOfMin(arr, arr.length);
assert Arrays.equals(target, res);
//assert Arrays.equals(target, res);
Copy link
Member

Choose a reason for hiding this comment

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

Please remove main()

Comment on lines 65 to 70
// Print the result
for (int i = 1; i <= n; i++) {
System.out.println();
System.out.print("ans: ");
for (int i = 0; i < n; i++) {
System.out.print(ans[i] + " ");
}
Copy link
Member

Choose a reason for hiding this comment

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

Please remove printing the result

}

}
}
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
}
}

@siriak
Copy link
Member

siriak commented Mar 8, 2022

And please update to the latest master

@github-actions
Copy link

github-actions bot commented Apr 8, 2022

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale label Apr 8, 2022
@siddhant2002
Copy link
Contributor

Can I work under this issue?

@github-actions github-actions bot removed the stale label Apr 10, 2022
@siddhant2002
Copy link
Contributor

Can I work under this issue?

@siriak
Copy link
Member

siriak commented Apr 26, 2022

@siddhant2002 yes, you can

@github-actions
Copy link

github-actions bot commented Jun 6, 2022

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale label Jun 6, 2022
@github-actions
Copy link

Please reopen this pull request once you commit the changes requested or make improvements on the code. If this is not the case and you need some help, feel free to seek help from our Gitter or ping one of the reviewers. Thank you for your contributions!

@github-actions github-actions bot closed this Jun 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants