Skip to content

Conversation

NayanSaraff
Copy link

  • I have read CONTRIBUTING.md.
  • This pull request is all my own work -- I have not plagiarized it.
  • All filenames are in PascalCase.
  • All functions and variable names follow Java naming conventions.
  • All new algorithms have a URL in their comments that points to Wikipedia or other similar explanations.
  • All new code is formatted with clang-format -i --style=file path/to/your/file.java

@codecov-commenter
Copy link

codecov-commenter commented Oct 3, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 76.30%. Comparing base (3eb521b) to head (7603303).
⚠️ Report is 7 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #6600      +/-   ##
============================================
+ Coverage     75.80%   76.30%   +0.49%     
- Complexity     5804     5919     +115     
============================================
  Files           705      710       +5     
  Lines         19846    20130     +284     
  Branches       3851     3902      +51     
============================================
+ Hits          15045    15360     +315     
+ Misses         4218     4179      -39     
- Partials        583      591       +8     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Member

@DenizAltunkapan DenizAltunkapan left a 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:

  1. The class-level Javadoc and the reference comment should be combined and placed directly above the class declaration.
  2. Consider adding more detailed explanations for the methods (nextGreaterElement and nextSmallerElement), including their time and space complexities.
  3. It would be great to include a proper test class to verify correctness for multiple scenarios.

@NayanSaraff

Added main method and test scenarios for next greater and next smaller element functions.
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.

3 participants