Look, I'm sorry I didn't go back and re-read your posts before preaching to the choir. All you have to say is "I understand ^ and ** and polys."
What you are failing to grasp is sprawled all over pages 1 through 4 of this thread. It is fine if you want to jump in late but if you are then told "you've missed something" then you have probably missed something.
The purpose of using a programming language is to deal with abstractions. There is nothing magical about it. The last three or four posts OP and I made dealt explicitly with the "special function" of turning adjacent like terms into a single term, for every term in the list. Notation has absolutely no effect on the operation.
I can just give the OP code. But I won't. I want him to write it himself. (He can do it just fine and he'll be happier with the result.) What he is struggling with is how to arrange his data to do the reduction. This requires abstract thought over what is happening to the terms of the polynomial.
What you are struggling with is already a solved point. (Check out the operator>> and the Polynomial class's data structure.)
Sorry if I upset you.