Algorithms and analysis | Computer Science homework help
CS277 – Homework 1 Total points: 85 1. Consider the following polynomial with n terms, where ai is the ith coefficient: P (x) = n−1∑ i=0 aix i = a0 + a1x+ a2x 2 + …+ an−1x n−1 Below is pseudocode of a naive algorithm that calculates P (x) for some input x: 1 Function pow(x, i): 2 // x is a number, i is […]