linked structures method is quite simple but not very efficient the implementation of the polynomial multiplication is provided in lines - of listing we leave as an exercise the proof that the mul method requires quadratic time in the worst case as well as the development of more efficient implementation listing implementation of the polynomial multiply operation class polynomial def multiplyselfrhspoly )assert self degree(> and rhspoly degree(> "multiplication only allowed on non-empty polynomials create new polynomial by multiplying rhspoly by the first term node self _polyhead newpoly rhspoly _termmultiplynode iterate through the remaining terms of the poly computing the product of the rhspoly by each term node node next while node is not none temppoly rhspoly _termmultiplynode newpoly newpoly addtemppoly node node next return newpoly helper method for creating new polynomial from multiplying an existing polynomial by another term def _termmultiplyselftermnode )newpoly polynomial(iterate through the terms and compute the product of each term and the term in termnode curr curr next while curr is not none compute the product of the term newdegree curr degree termnode degree newcoeff curr coefficient termnode coefficient append it to the new polynomial newpoly _appendtermnewdegreenewcoeff advance the current pointer curr curr next return newpoly