Slideshow

Monday 25 February 2013


260. What is the advantage of doubly linked list over singly linked list? 

Ans:
Advantages of the doubly linked list over singly linked list
1 A doubly linked list can be traversed in two directions; in the usual forward
direction from the beginning of the list to the end, or in the backward direction from
the end of the list to the beginning of the list.
2 Given the location of a node 'N' in the list, one can have immediate access to
both the next node and the preceding node in the list.
3 Given a pointer to a particular node 'N', in a doubly linked list, we can delete the
Node 'N' without traversing any part of the list. Similarly, insertion can also be
made before or after 'N' without traversing the list.

No comments:

Post a Comment