Leetcode 150 Reverse Polish Notation
Original Problem
1 

Approach
In everday life we evaluate numbers with operators in the form of a + b
this is called infix notatio, meaning the operator is in between the two values being operated on.
Polish notaiton, also known as prefix notation has operator in front of the operands in the form of + a b
.
You mightâ€™ve guessed it! Reversedpolishnotation, also called postfix notation has the operands before the operator a b +
, this problem is asking us to write a function that would take in an array of postfix operations and return the end value.
To solve this problem there are recursive strategies we can use, but it is most famous for the stack approach.
Start with a stack, append the two operands into the stack, use the operator to operate on the two operands(vals) and append the result back to the stack. (this way we always have the current val in the operation to work with).
In the end all the operands in the stack should be reduced to a single value via all the operators throughout the process.
Implementation
1 

https://leetcode.com/problems/evaluatereversepolishnotation/