1
1
mirror of https://github.com/theoludwig/programming-challenges.git synced 2025-05-18 12:02:53 +02:00

style: lint ignore and .md files

This commit is contained in:
divlo
2020-11-15 10:56:27 +01:00
parent 9db51da1b0
commit 954cd934b7
12 changed files with 846 additions and 66 deletions

View File

@ -6,13 +6,13 @@ Created by [@Divlo](https://github.com/Divlo) on 29 September 2020.
Your job is to create a calculator which evaluates expressions in Reverse Polish notation (a mathematical notation in which operators follow their operands. It does not need any parentheses as long as each operator has a fixed number of operands).
For example expression 5 1 2 + 4 * + 3 - (which is equivalent to 5 + ((1 + 2) * 4) - 3 in normal notation) should evaluate to 14.
For example expression 5 1 2 + 4 _ + 3 - (which is equivalent to 5 + ((1 + 2) _ 4) - 3 in normal notation) should evaluate to 14.
For your convenience, the input is formatted such that a space is provided between every token.
Empty expression should evaluate to 0.
Valid operations are +, -, *, /.
Valid operations are +, -, \*, /.
You may assume that there won't be exceptional situations (like stack underflow or division by zero).