There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies. The first method is far more difficult. C.A.R. Hoare

Delete a node in a Doubly linked List

Language Java | Level Intermediate | Category Data structure | September 5, 2015 10:54 pm


Data structure Description

Write a program to delete the node in doubly linked list. The doubly linked list has two references one refer to the previous node and another refer to the next node. Delete node operation can delete head, tail or any position from the linked list.


Output

   					 

Add 34 and 10 to the list.
Add 56 and 364 to the list.
Iterate the elements forward from Linked list: 34 10 56 364 
Remove first element from the list: 34
Remove last element from the list: 364
Iterate the elements Backward from Linked list: 56 10 

				    

Comments


No comments available!

Please login to add comments.