Solution: Questions 1-4 and Question 5
Let p(x) denote a polynomial of degree n-1, i.e.,
n-1 p(x) = åaixi, an-1 ¹ 0. i=1Input: A[0..n-1], the array of coefficients, and x the point at which to evaluate. The size of the input is the size of the array A (note that some lower degree coefficients may be 0.)
Output: The value p(x).The procedure: PolyEval(A,x) value = a0 for i=1 to n-1 term = A[i] for j=1 to i term = term * x value = value + term return value