.. | ||
python3 | ||
README.md |
Given a string array representing an expression, and return the Reverse Polish notation of this expression. (remove the parentheses)
Definition of Reverse Polish Notation:
Example
Example 1:
Input: ["3", "-", "4", "+", "5"] Output: ["3", "4", "-", "5", "+"] Explanation: 3 - 4 + 5 = -1 + 5 = 4 3 4 - 5 + = -1 5 + = 4
Example 2:
Input: ["(", "5", "-", "6", ")", "*", "7"] Output: ["5","6","-","7","*"] Explanation: (5 - 6) * 7 = -1 * 7 = -7 5 6 - 7 * = -1 7 * = -7