https://github.com/freddiehaddad/shuntingyard
Simple calculator using the Shunting Yard algorithm
https://github.com/freddiehaddad/shuntingyard
calculator go golang leetcode leetcode-go leetcode-golang leetcode-solutions parser reverse-polish-notation shunting-yard-algorithm
Last synced: 5 months ago
JSON representation
Simple calculator using the Shunting Yard algorithm
- Host: GitHub
- URL: https://github.com/freddiehaddad/shuntingyard
- Owner: freddiehaddad
- Created: 2024-03-04T01:29:23.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-03-04T01:31:54.000Z (over 1 year ago)
- Last Synced: 2025-07-07T00:43:17.583Z (5 months ago)
- Topics: calculator, go, golang, leetcode, leetcode-go, leetcode-golang, leetcode-solutions, parser, reverse-polish-notation, shunting-yard-algorithm
- Language: Go
- Homepage: https://leetcode.com/problems/basic-calculator/description/?envType=study-plan-v2&envId=top-interview-150
- Size: 1.95 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Shunting Yard Algorithm
The program is simple implementation of the [Shunting Yard Algorithm] that
supports addition and subtraction of positive and negative integers. It uses
[Reverse Polish notation] to structure the input and perform the evaluation.
Supported operators are:
- Plus (+)
- Minus (-)
- Parentheses
Precedence is give to expressions surrounded by parentheses. Evaluation is
left-associative.
[reverse polish notation]: https://en.wikipedia.org/wiki/Reverse_Polish_notation
[shunting yard algorithm]: https://en.wikipedia.org/wiki/Shunting_yard_algorithm