-
Notifications
You must be signed in to change notification settings - Fork 20.8k
Monotonic_Increasing_Stack #6600
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
Conversation
Added a comment block explaining the Monotonic Increasing Stack algorithm and its applications.
Added a comment with a reference link for monotonic stack.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #6600 +/- ##
=========================================
Coverage 78.26% 78.26%
Complexity 6567 6567
=========================================
Files 743 743
Lines 21886 21886
Branches 4284 4284
=========================================
Hits 17129 17129
Misses 4074 4074
Partials 683 683 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Removed the main method and related print statements.
Removed unused import statement for Arrays.
DenizAltunkapan
left a comment
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.
The implementation is mostly correct, but a few improvements are needed before merging:
- The class-level Javadoc and the reference comment should be combined and placed directly above the class declaration.
- Consider adding more detailed explanations for the methods (
nextGreaterElementandnextSmallerElement), including their time and space complexities. - It would be great to include a proper test class to verify correctness for multiple scenarios.
Added main method and test scenarios for next greater and next smaller element functions.
|
This pull request has been automatically closed because its workflows or checks failed and it has been inactive for more than 14 days. Please fix the workflows and reopen if you'd like to continue. Merging from main/master alone does not count as activity. |
clang-format -i --style=file path/to/your/file.java