# What does " Each operand may be an integer or another expression." means?

• i have got "accepted",but i was wondering whether i got the meaning of this problem.the question said the operand can be a another expression,but if i do this,i got wrong anwser.is there a fault in the question?

• I think `Each operand may be an integer or another expression` means that in the `original expression` such as `(2 + 1) * 3`, operand may be an integer or another expression. but test data are `Reverse Polish Notation`, each token is an integer or a operator.

Maybe, to express this problem in a less confusing way will make our world better :)

• Does this mean the intermediate results should be stored as integer? For example, should (1 / 3) * 3 be zero? I found that using a double stack failed to pass the test, but using a int stack worked.

e.g. 10 * 6 / ((9+3) * (-11)) + 17 + 5

Input: ["10","6", "* ", "9","3","+","-11","* ","/", "17","+","5","+"]

Output: 21

Expected: 22

• Error in your input, it could be "10","6","* ","9","3","+","-11","* ","/","17","+","5","+".
I got 22 using one int stack. So i guess intermediate results are as integers here.

• yes, i agree. The test data seem to contain only integers and operators in each string input. If it could be an independent expression in a single string, there should be additional formatting instructions, such as "9 3 +" with space separator, etc.

• Thanks. Sorry for the typo-:)

• Seems that I must add a space after "* " to make it displayed correctly.

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.