I'm telling you I can't stand online programming courses in college, but what choice do I have? I have no live instructor. Its very difficult.
I have an assignment. Convert a linked list to a double linked list. Nothing in my book on how to do this. I'm supposed to research how myself.
The list I have to convert is pretty long, but I pray that there is someone out there with the patience to help me. I'm desperate.
Here is the single linked list I need to convert. Too long to paste here.
URL deleted. The list in question is Fig 12.3 in Chapter 12 of C How to Program 5th edition by Deitel.
The only thing I understand is that the double linked list should be able to go forward and backward. What exactly does that mean in my case? When I insert a character into the list, I go forward, when I delete a character, I go backward. What would a double linked list do different?
This is the only clue my professor gave me.
Code:
You should add a print backwards to prove that the list works in reverse.
You must remove the previous node in the insert and delete routines and use the previous pointer instead.
A node structure for a doubly linked list is:
struct Node{ int data;/ this can be any type data Node *next; Node *prev; }
Can someone please explain this to me?