feat: add algorithm to evaluate postfix string#1441
Merged
raklaptudirm merged 11 commits intoTheAlgorithms:masterfrom Oct 10, 2023
gaurovgiri:feat/evaluate-postfix-string
Merged
feat: add algorithm to evaluate postfix string#1441raklaptudirm merged 11 commits intoTheAlgorithms:masterfrom gaurovgiri:feat/evaluate-postfix-string
raklaptudirm merged 11 commits intoTheAlgorithms:masterfrom
gaurovgiri:feat/evaluate-postfix-string
Conversation
appgurueu
reviewed
Oct 7, 2023
Collaborator
appgurueu
left a comment
There was a problem hiding this comment.
Looks good! It should be made clear that this is postfix in the name / docs. That's my only really "major" point; most of my comments are more or less matters of taste / minor things, the code looks correct as-is.
Some more minor points:
- I'm not sure Data-Structures/Stack is the correct folder (we use this folder for stack data structures, not for algorithms using stacks currently), but I'm not sure which folder (if any) would be more suitable. Evaluation of expressions can be seen as "math", but in programming lingo math is usually reserved for something else. "string" also doesn't cut it. I'd be fine if you created a "misc" folder for this.
- You could improve the test coverage a bit - for example, also test
-, test too many numbers left on stack, test no number on stack (but I don't consider this necesssary).
appgurueu
reviewed
Oct 7, 2023
appgurueu
previously approved these changes
Oct 8, 2023
Collaborator
appgurueu
left a comment
There was a problem hiding this comment.
Though the path should probably be something else, but I'm not sure what. As said, I'd be fine with adding a Misc folder for this, then this could be Misc/EvaluatePostfixExpression.js or similar.
Contributor
Author
|
Sorry, I was doing changes locally and resolving the mentioned comments and hadn't pushed. @appgurueu Can you please review the changes. Thank you. |
appgurueu
approved these changes
Oct 8, 2023
raklaptudirm
approved these changes
Oct 10, 2023
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.
Describe your change:
Checklist:
Example:
UserProfile.jsis allowed butuserprofile.js,Userprofile.js,user-Profile.js,userProfile.jsare notFixes: #{$ISSUE_NO}.