Algorithm to add two polynomials?

Consider using an array where each index represents the value for the equivalent exponent. So 4x^4 + 5x^3 - 4 would be [-4, 0, 0, 5, 4]. Use a parsing method to separate bases, signs and exponents to properly distribute the elements, such as the String Class.