-
Notifications
You must be signed in to change notification settings - Fork 20k
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
refactor: Refactored calculateMaxOfMin() (#5) #2957
Conversation
</project> |
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.
</project> | |
</project> | |
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.
Looks good, only a couple of comments
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); |
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.
Please remove main()
// 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] + " "); | ||
} |
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.
Please remove printing the result
} | ||
|
||
} | ||
} |
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.
} | |
} | |
And please update to the latest master |
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. |
Can I work under this issue? |
Can I work under this issue? |
@siddhant2002 yes, you can |
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. |
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! |
Refactored the function calcultateMaxOfMin form the class MaximinumMinimumWindow.