Skip to content

fix: handle inputs like "2 +" in StackPostfixNotation #4262

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

vil02
Copy link
Member

@vil02 vil02 commented Jul 26, 2023

After #4261 was merged, I have realized that the method StackPostfixNotation.postfixEvaluate still does not handle properly all of the inputs (e. g. "2 +" or "+"). This PR fixes that.

  • 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.

@vil02 vil02 changed the title fix: handle inputs like 2 + in StackPostfixNotation fix: handle inputs like "2 +" in StackPostfixNotation Jul 26, 2023
@vil02 vil02 marked this pull request as ready for review July 26, 2023 08:12
@albina-astr
Copy link
Contributor

@siriak Hi Andrii! It seems I don't have access to merge PRs. Can you help to merge this PR? Thanks!

@albina-astr albina-astr merged commit e5c7a08 into TheAlgorithms:master Jul 26, 2023
@vil02 vil02 deleted the fix_stack_postfix_notation_for_input_with_too_few_args branch July 26, 2023 14:45
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