Create and traverse Doubly Linked List
Create a Doubly linked list

- create a node template with the basic code given below.
*prev pointer has the address of the previous node for from the actual current node
*next pointer hs address of the next node for the actual current node.
2.use typedef keyword to create an alias name for structure dll (data type).here in the below code new datatype known as the node is created using the typedef keyword
3 .write a function for creating a newnode using malloc function and taking node data value from the user with in the function
In the above code getnode() function returns the node type of pointer, it returns the newnode from the function .when the getnode function is called in the program this creates a node in the memory.
create two more pointers known as *newnode,*temp inside createnodes function, use FOR loop for condition (i<no of nodes).
4.call getnode( ) function for the newnode pointer ,inside for loop
\5. create an if block for condition (head==NULL) then assign newnode to the head

for the else block
6.to add next nodes, initialize temp with a head pointer

7.use while condition (temp->next!=NULL), so that the temp will be at the last or if there is only one node the temp pointer will e there in the first place
if there are more then one node, this while condition is useful, inside while loop change temp from one node to the next node until it points to the last node
8.link temp node next address to the newnode

9.link newnode previous address to the temp node

Program to create Doubly linked list
Traverse doubly linked list from the beginning
1.create a *temp pointer from node structure, initialize this temp pointer with head

2.access every data using temp pointer ,move temp pointer by replacing next nodes address (temp=temp->next ) until the condition (temp!=NULL)


3.display every node data, when the particular node has temp pointer
Program to traverse doubly linked list from the beginning
traverse doubly linked list from the ending
1.create a *temp pointer from node structure, initialize this temp pointer with head

2.move temp pointer to the ending of the doubly linked list, move temp pointer by replacing next nodes address (temp=temp->next ) until the condition (temp!=NULL)

3.display the data from the node, then move temp pointer in reverse from ending to beginning buy replacing previous node address (temp=temp->prev ) until the condition (temp!=NULL)

