Question: C++ program for evaluating a polynomial by the brute-force method (not horner)? e.g. 5x3 + 4x2 + 2x + 1 different psuedocode than previous asked
C++ program for evaluating a polynomial by the brute-force method (not horner)? e.g. 5x3 + 4x2 + 2x + 1
different psuedocode than previous asked question:
And what would the time complexity be?
p 0.0
for i n downto 0 do
power 1 for j 1 to i do //compute xi
power power * x
p p + a[i] * power
return p
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
