Hi,

I have created a code that adds/multiplies/subtracts a file of polynomials. I have used doubly linked list (as required in the project), it works correctly as well as all functions. I'm facing a problem that I face data loss during passing the linked list to add/sub/multiply functions because in these functions I delete added values from equations to the linked list. I know that I can deeply copy the data of the linked list but it will make a big time complexity. So is there any way to pass the linked list by value?

Here is how I defined the list.
Code:
typedef struct node {    double coefficient, power;
    struct node *Previous, *Next;
} *equationList;
NOTE: I can not show my all code since it's a project and some students will copy it.