Hello. I am having a tough time understanding the concept of double linked list. For now, i understand double linked list has 2 links, one forward and another one previous. data is in the middle. when inserting must check where to insert. if previous is equal to null, then can insert it to previous. Set the previous to be equal to the newly allocated node. I am looking to do a bubble sort using double linked list. I want to understand the concept first then I can do it. Can someone give some usefule links or explain me the concept? Thank you.

Thank you for the links....if a newnode is added using a malloc() and the insertion is done in the beginning, so the previous should be null and head->next would be null, right?...How about the next insertion? I did a bit but not working....not sure if is correct.

``````typedef struct nodes
{
int value;
struct nodes *prev;
struct nodes *next;
}node;

printf("\nHow many integers to insert? ");
scanf ("%d", &num);
{
for (i=0;i<num;i++)
{
printf("\nEnter integer %d: ",i+1);
scanf("%d", &number);
newnode=malloc(sizeof(node));
if (newnode==NULL)
{
printf("\n\nUnable to allocate memory");
exit(EXIT_FAILURE);
}
newnode->value=number;
newnode->next=current;
{
previous->next=newnode;
}
else
{