Lecture 12

Now we don need the special case at the beginning of

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: cur” to the first node with data in it. Now we don’ need the special case at the beginning of t the list. 11 10 Some people put global information into the dummy head node, e.g., the length, smallest, and largest number. Problem in C++: This record would look different from all other records, and prev cannot point to it. struct headrecord { int length, smallest, largest; int *firstitem; }; headrecord *head = new headrecord; prev = head; // wrong! 12 DOUBLY LINKED LISTS Insertion: Basic idea: Every record points to the next and the previous element of the list. cur Advantage: I...
View Full Document

This document was uploaded on 03/31/2014 for the course CS 114 at NJIT.

Ask a homework question - tutors are online