Evaluating a string expression

Question

Given a string consisting of parentheses, single digits, and positive and negative signs, build a function (or functions) that convert the string into a mathematical expression and return the result. You should avoid using built-in parsers. For example, given "-4 + (3 + 1)", you should return 0.

Solution

Access restricted

Subscribe to premium account to see the solution.

Get premium now