Function to insert a node at the beginning of a linked list
void insertAtTheBegin ( struct Node * * start_ref , int data ) { struct Node * ptr1 = new Node ; ptr1 -> data = data ; ptr1 -> next = * start_ref ; if ( * start_ref != NULL ) ( * start_ref ) -> prev = ptr1 ; * start_ref = ptr1 ; }