Polynomial Regression is a form of linear regression in which the relationship between the independent variable x and dependent variable y is modeled as an nth degre...

Share

Given a few terms of a sequence, we are often asked to find the expression for the nth term of this sequence. While there is a multitude of ways to do this, In this a...

Share

What is Pseudo-polynomial?
An algorithm whose worst case time complexity depends on numeric value of input (not number of inputs) is called Pseudo-polynomial algorit...

Share

It is a very well know fact that there is no known polynomial time solution for NP Complete problems and these problems occur a lot in real world (See this, this and ...

Share

Given two polynomials, A(x) and B(x), find the product C(x) = A(x)*B(x). In the previous post we discussed the recursive approach to solve this problem which has O(n...

Share

Given a polynomial of the form cnxn + cn-1xn-1 + cn-2xn-2 + … + c1x + c0 and a value of x, find the value of polynomial for a given value of x. Here cn, cn-1,...

Share

Given a sequence with some of its term, we need to calculate next K term of this sequence. It is given that sequence is generated by some polynomial, however complex ...

Share

Given two polynomials represented by two arrays, write a function that adds given two polynomials.
Example:
Input: A[] = {5, 0, 10, 6}
B[] = {1, 2, 4}
Out...

Share

Given two polynomials represented by two arrays, write a function that multiplies given two polynomials.
Example:
Input: A[] = {5, 0, 10, 6}
B[] = {1, 2, ...

Share

Given a polynomial as string and a value. Evaluate polynomial’s derivative for the given value.
Note: The input format is such that there is a whitespace betwe...

Share