Doubly-linked-list.cpp
// function to print the doubly linked list 
function to print the doubly linked list
function to print the doubly linked list
void printList(struct Node* head) 
{ 
    while (head != NULL) { 
        cout << head->data << " "; 
        head = head->next; 
    } 
}
void printList ( struct Node * head ) { while ( head != NULL ) { cout << head -> data << " " ; head = head -> next ; } }
function to print the doubly linked list
function to print the doubly linked list