#21_Doubly linked list
#include <stdio.h> #include <stdlib.h> //Doubly linked list struct node { int data; struct node * prev; struct node * next; }; void traverse ( struct node * head ) { struct node * ptr = head ; while (ptr->next != NULL ) { printf ( " %d " , * ptr); ptr = ptr->next; } printf ( " %d " , * ptr); while (ptr->prev != NULL ) { printf ( " %d " , * ptr); ...