Java Reference
In-Depth Information
CURR
...
...
20
23
12
INSERT 10:
10
(A)
CURR
4
5
...
...
20
23
12
10
3
1
2
(B)
Figure4.16 Insertion for doubly linked lists. The labels 1 , 2 , a nd 3 cor-
respond to assignments done b y t he linked list node constructor. 4 marks the
assignment to curr->next . 5 marks the assignment to the prev pointer of
the node following the newly inserted node.
CURR
...
...
20
23
12
(A)
CURR
...
...
20
12
IT
23
(B)
Figure4.17 Doubly linked list removal. Element it stores the element of the
node being removed. Then the nodes to either side have their pointers adjusted.
 
Search WWH ::




Custom Search