feat: add StockSpanProblem algorithm#7312
Open
oleksii-tumanov wants to merge 1 commit intoTheAlgorithms:masterfrom
Open
feat: add StockSpanProblem algorithm#7312oleksii-tumanov wants to merge 1 commit intoTheAlgorithms:masterfrom
oleksii-tumanov wants to merge 1 commit intoTheAlgorithms:masterfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #7312 +/- ##
=========================================
Coverage 79.44% 79.45%
- Complexity 7064 7070 +6
=========================================
Files 788 789 +1
Lines 23129 23139 +10
Branches 4548 4551 +3
=========================================
+ Hits 18375 18385 +10
Misses 4022 4022
Partials 732 732 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
e2ece88 to
105aae5
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
clang-format -i --style=file path/to/your/file.javaDescription
Adds a monotonic-stack implementation of the Stock Span Problem.
The implementation:
Closes #7311
Test Case
Validated with:
[10, 4, 5, 90, 120, 80] -> [1, 1, 2, 4, 5, 1]IllegalArgumentExceptionCommands used:
mvn -Dtest=StockSpanProblemTest testmvn -DskipTests checkstyle:check