CSC 2200 Lecture Notes - Lecture 6: Doubly Linked List, Linked List

13 views3 pages
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.
Unlock document

This preview shows page 1 of the document.
Unlock all 3 pages and 3 million more documents.

Already have an account? Log in

Get OneClass Notes+

Unlimited access to class notes and textbook notes.

YearlyBest Value
75% OFF
$8 USD/m
Monthly
$30 USD/m
You will be charged $96 USD upfront and auto renewed at the end of each cycle. You may cancel anytime under Payment Settings. For more information, see our Terms and Privacy.
Payments are encrypted using 256-bit SSL. Powered by Stripe.