-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Added BalancedParenthesesChecker.cs, NextGreaterElement.cs and ReverseStack.cs #473
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
…related to stacks
Please put separate algorithms in separate classes with descriptive names and check if they are already implemented in the repository |
… BalancedParenthesesChecker.cs, NextGreaterElement.cs and ReverseStack.cs
@siriak As suggested, i have created separate classes for algorithms and removed redundant code |
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 move them to algorithms project because they are not data structures, they only use stack data structure, add tests, and fix Codacy and other build checks
@siriak Moved to Algorithms project, Added Tests, fixed codacy and build issues. Kindly review |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #473 +/- ##
==========================================
+ Coverage 94.97% 95.04% +0.06%
==========================================
Files 243 246 +3
Lines 10286 10367 +81
Branches 1464 1478 +14
==========================================
+ Hits 9769 9853 +84
+ Misses 398 395 -3
Partials 119 119 ☔ View full report in Codecov by Sentry. |
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, thanks!
Description
I have created stack-based utility classes in C# that can be used by other developers in their solutions.
This utility provides commonly used operations related to stacks, which can be beneficial for solving various problems such as expression evaluations, balanced parentheses, or maintaining a history of operations.
These classes can be used to perform below stack-related operations:
Next Greater Element: Given an array, find the next greater element for each element in the array.
Balanced Parentheses Checker: A utility to check whether a given expression has balanced parentheses.
Reverse a Stack: Function to reverse a stack.
CheckList: