Polynomial Equations
You are given a string representing a polynomial equation and a single integer representing the variable X as arguments. Given X, return the result of evaluating the expression.
Requirements
- Must return an integer
Example #1
solve('5*x^2+3*x-10', 3)
> 44
Example #2
solve('2x^3-6x^2+2x-1', 3)
> 5