Code:typdef struct node *link; struct node { char item; link next; };
So I have to create a list (easy), pass the head to a function called
(easy)Code:dlink doublify (link l);
then I have to convert this list into a double linked list, in essence, instead of only the next pointer (not so easy)
I typedefed a new one,
Now I am not sure how to set for example, the head of the list as the previous toCode:typedef struct dnode *dlink; struct dnode { char item dlink prev, next; };
And so on and so forth while traversing the list, essentially, making the list a double linked list.Code:head->next;
Any tips?
Cheers