Let be a vector of integer numbers that contains the coefficients of a polynomial of degree . For instance, the vector represents , a polynomial of degree .
Write a function
int evaluate(const vector<int>& p, int x);
that evaluates the polynomial at the point @x@, that is, that returns .
Use the Horner scheme:
You only need to submit the required procedure; your main program will be ignored.