Jun 122012
 
Write an effective algorithm to compute the value of below polynomial for a given value of x :
 F(x) = Cn.xn + Cn-1.xn-1 + Cn-2.xn-2 + … … + C3.x3 + C2.x2 + C1.x + C0
 The normal function to compute this will take O(n2) time. But your algorithm should not take more than O(n) time.

Continue reading »