I'm having a homework: When we input the math expression like -(2 + 3) * 1/5 , the output should be -1. After doing some research, I found that RPN algorithm is the way to solve this problem. So what I did is convert the expression from infix to postfix. But the problem is I can't determine the operands in some situations, like this:
Input: 11+((10-2)*6)+7
Infix-to-Postfix-----------
Output: 11102-6*+7+
There is no white space between "11" and "10", and between "10" and "2" so I can't determine every single operand correctly . Because my output (postfix) is a string, I'm totally don't know how to solve this problem. Is there any idea for this?