11.07.2015 Views

Data Structures and Algorithm Analysis - Computer Science at ...

Data Structures and Algorithm Analysis - Computer Science at ...

Data Structures and Algorithm Analysis - Computer Science at ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

116 Chap. 4 Lists, Stacks, <strong>and</strong> Queuescurr... 202312...Insert 10:10(a)curr... 20410523 12...3 1 2(b)Figure 4.16 Insertion for doubly linked lists. The labels 1 , 2 , <strong>and</strong> 3 correspondto assignments done by the linked list node constructor. 4 marks theassignment to curr->next. 5 marks the assignment to the prev pointer ofthe node following the newly inserted node.curr... 20curr23 12(a)...... ...20 12it23(b)Figure 4.17 Doubly linked list removal. Element it stores the element of thenode being removed. Then the nodes to either side have their pointers adjusted.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!