I was thinking how do I evaluate this without using binary trees?
Code:=(x+1)(x+2)(x+3) =(x+1)(x+2) ...Firstly, evaluate this =(x^2+3x+2)(x+3)...Then using the result evaluate this =x^3+3x^2+3x^2+6x+2x+6 =x^3+6x^2+8x+6
So I would be using the function recursively? Question is getting the coefficents and multiplying them together whilst at the same time remembering to add the exponents of x.
Here's my updated version of add/subtract termsCode:x^1 * x^1 = x^2