Learning to program has no more to do with designing interactive software than learning to touch type has to do with writing poetry Ted Nelson

Doubly linked list

Language Java | Level Intermediate | Category Data structure | September 4, 2015 8:45 pm

Data structure Description

Doubly linked list is a linked data structure that consists of a set of sequentially linked nodes. Each node contains two links (references to the previous and to the next node) and data. The links help to iterate the node forward and backward.

XOR-linked list allows doubly linked list to be implemented using a single link field in each node. The XOR linked list decrease the memory size compare than doubly linked list. The XOR linking has few drawbacks and it is difficult to debug using debugging tools.

Write a program to implement doubly ended linked list with all the operations.


insert at front: 9, 56, 74
List : 74->56->9->NULL
insert at rear: 34, 47, 99
List : 74->56->9->34->47->99->NULL

Delete first item from List
Delete last item from List
List : 56->9->34->47->NULL

Delete  item '34' from List
List : 56->9->47->NULL

insert 11 after 9  in List
List : 56->9->11->47->NULL



No comments available!

Please login to add comments.