This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: 01/26/2004 Disadvantages of single linked list:--Deletion of the last element in the linked list requires traveling the entire list remove last element in single linked list is O(n)--Also, removing an intermediate element takes O(n) Double Linked list With double linked list we do these operations in O(__) previ ous val next previ ous val next eade r node Tail node Header node and tail node do not store any value. These nodes are called dummy node or sentinel nodes. Empty list: Header Tail The sentinel nodes simplify the operations in the list by eliminating special cases at the beginning and at the end of the list....
View Full Document
This note was uploaded on 02/02/2012 for the course CS 251 taught by Professor Staff during the Fall '08 term at Purdue University-West Lafayette.
- Fall '08
- Data Structures