Question: HELLO, PLEASE HELP ME TO WRITE A PERFECT PROGRAM for this question, Using C/C++ Language. This is a very important project. So please write as
HELLO, PLEASE HELP ME TO WRITE A PERFECT PROGRAM for this question, Using C/C++ Language. This is a very important project. So please write as much as possible comments so that my teacher understands. I have attached the whole question with details. This is for my Data Structure and Algorithm Course. Thank you.


Project 1: Adding two polynomials with Linked Lists () 1: Introduction Problem description and (if any) background of the algorithms Description: First, enter every term (i.e., a pair (coefficient, exponent)) of the polynomial in order; then, store the one-variable polynomial into a linked list; next, create two linked lists of two polynomials. Finally, add the two polynomials in the two linked lists, and output the result. Input: Several sets of data are needed. Every set of testing data is required to be consistent with the following format The inputted first line is an integer n, i.e., the number of terms of the first polynomial La Then input n lines, and each line represents one term of a polynomial, with each term including two elements: a coefficient and an exponent Similarly, an integer m is then entered, which is the number of terms of the second polynomial Lb. Then, as before, enter each term of Lb. The exponents are entered by the order from smaller ones to larger ones. (n, m1000) Output: The resulted polynomial by adding La and Lb The output format: The exponents are outputted from smaller ones to large ones. Each line includes only one term, with a space separating the coefficient and the corresponding exponent Sample Input Sample Output
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
