CSC 2200 Lecture Notes - Lecture 6: Doubly Linked List, Linked List
13 views3 pages
19 Jul 2018
School
Department
Course
Professor
CSC 2200 lecture 6
Lists
• Doubly linked lists
o Doubly Linked List is a variation of Linked list in which navigation is possible in
both ways, either forward or backward easily as compared to Single Linked List.
o Following are the important terms to understand the concept of doubly linked
list.
▪ Link
• Each link of a linked list can store a data called an element.
▪ Next
• Each link of a linked list contains a link to the next link called Next.
▪ Prev
• Each link of a linked list contains a link to the previous link called
Prev.
▪ LinkedList
• A Linked List contains the connection link to the first link called
First and to the last link called Last.
• Double linked list representation
o Doubly Linked List contains a link element called first and last.
o Each link carries a data field(s) and two link fields called next and prev.
o Each link is linked with its next link using its next link.