Implement Poly(coeffs) where coeffs[i] is the coefficient of (trailing zeros are trimmed; the zero polynomial has coeffs == [0]):
degree property (-1... no: the zero polynomial has degree 0 for simplicity)p(x) evaluates with Horner's method+, -, * between polynomials (and with plain numbers on either side)derivative()str(p) like "3x^2 - x + 2": highest power first, coefficient 1 omitted, x instead of x^1, and signs written as + / -Unlock this and every premium problem across all tracks — plus hidden-test grading, advanced AI engineering modules and new content every week.
Start 7-day free trial