I have an assignment due for my class taking 2 linked lists and combining them in order into a third.
but all we talked about was inserting a new Node at specific points and deleting them
i cant seem to get the basic task of just making the a linked list without an error.
the structure looks like
struct Node
{
? ? int item;
? ? Node *next;
};
all i want is a way to make 1 linked list with values 1, 3, 5, 7, 9, 11, 13, 15, 17, 19
and the other 0, 2, 4, 6, 8, 10, 12, 14, 16, 18
the assignment is combining the two into a third
if someone could help(hints of course - I dont need code psuedocode would be great to explain it) with this I could start on the rest of the assignment
Question
Crunch
I have an assignment due for my class taking 2 linked lists and combining them in order into a third.
but all we talked about was inserting a new Node at specific points and deleting them
i cant seem to get the basic task of just making the a linked list without an error.
the structure looks like
struct Node { ? ? int item; ? ? Node *next; };all i want is a way to make 1 linked list with values 1, 3, 5, 7, 9, 11, 13, 15, 17, 19
and the other 0, 2, 4, 6, 8, 10, 12, 14, 16, 18
the assignment is combining the two into a third
if someone could help(hints of course - I dont need code psuedocode would be great to explain it) with this I could start on the rest of the assignment
Link to comment
Share on other sites
8 answers to this question
Recommended Posts