Question
Question
Lab Assignment – 3
1. Write a program to implement the concept of polynomial addition. Create two linked
lists corresponding to the input polynomials to perform the addition. Print the result in
the form of equation.
Example:
Input Polynomial Equations:
P1: 5x8 + 15x6 + 7x4 + 22x2 + 12x + 29
P2: 32x8 + 13x7 + 18x6 + 16x5 + 22x3 + 45
3. Write a program to create a double linked list of size N. Take input from the user for the
size and data elements to be stored. Print the created double linked list.
4. Write a program to insert three nodes at the end of the double linked list and print the
updated linked list.
5. Write a program to delete a node having value “X” from the double linked list and print
the updated linked list. Take the value of “X” as input from user.
Bonus Task:
Create a single program having menu of different operations to be performed on the double
linked list. For instance:
Select an option:
- Create a double linked list
o Take requirement from the user
- Insert a node in the double linked list
o Take requirement from the user
- Delete a node in the double linked list
o Take requirement from the user
- Display the elements of the double linked list