We will consider the general case of insertion : next : The address of the next node is saved hereĪ special pointer called Head pointer will be pointing to the first node of the listĪ simple doubly linked list with 3 elements can be represented as follows(X represents NULL) : Basic Operationsįollowing are the basic operations that are done on any linked list :. prev : The address of the previous node is saved here.The following terminologies will be used for describing the various sections of a node in Doubly linked list : Doubly Linked List contains an extra pointer to link the previous node which enables the backward traversing. We will look into how Doubly Linked List(DLL) is useful and how it is implemented as well.Further, the advantages and disadvantages will be discussedĭoubly Linked List has the flexibility of traversing the list in both the ways i.e., forwad and backward unlike singly linked list where movement is restricted in forward direction only. There are three common variations of linked list, namely: Linked List is a linear data structure similar to arrays but linked list elements are not stored at contiguous location the elements are linked using pointers.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |