The goal of this is to take a mathematical expression, evaluate it, and return the value. The value of the input string will never be more than 2^31-1, less than -2^31, and it will never be a decimal. There will also be no "compressed multiplation", e.x. 2(3-2).
You cannot use
exec(), or any other command that evaluates a string.
The input of this will only have parentheses, exponents, multiplication, division, subtraction, and addition. The Order of Operations will be used.
Here are some test strings you can put in:
2^(9/3)+4*(3-2)=12 5-6*(4/2)=-7 (2+3-5*54/3^2)^4=1500625