We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Good morning! Here's your coding interview problem for today.
This problem was asked by Jane Street.
Given an arithmetic expression in Reverse Polish Notation, write a program to evaluate it.
The expression is given as a list of numbers and operands. For example: [5, 3, '+'] should return 5 + 3 = 8.
[5, 3, '+']
5 + 3 = 8
For example, [15, 7, 1, 1, '+', '-', '/', 3, '*', 2, 1, 1, '+', '+', '-'] should return 5, since it is equivalent to ((15 / (7 - (1 + 1))) * 3) - (2 + (1 + 1)) = 5.
[15, 7, 1, 1, '+', '-', '/', 3, '*', 2, 1, 1, '+', '+', '-']
5
((15 / (7 - (1 + 1))) * 3) - (2 + (1 + 1)) = 5
You can assume the given expression is always valid.
The text was updated successfully, but these errors were encountered:
vaskoz
No branches or pull requests
Good morning! Here's your coding interview problem for today.
This problem was asked by Jane Street.
Given an arithmetic expression in Reverse Polish Notation, write a program to evaluate it.
The expression is given as a list of numbers and operands. For example:
[5, 3, '+']
should return5 + 3 = 8
.For example,
[15, 7, 1, 1, '+', '-', '/', 3, '*', 2, 1, 1, '+', '+', '-']
should return5
, since it is equivalent to((15 / (7 - (1 + 1))) * 3) - (2 + (1 + 1)) = 5
.You can assume the given expression is always valid.
The text was updated successfully, but these errors were encountered: