Topic 4 - Linked List 2
Topic 4 - Linked List 2
Linked list
Definition
Characteristics
Properties
LinkedList class
Linked list operation
X X
lastNode
newNode newNode
No traversing needed.
Compiled & edited by: Zahid Zainal
Improving Linked List (cont.)
How can we
improve?
then print
current item
Compiled & edited by: Zahid Zainal
Doubly Linked List
A linked list where every node has access to the next and
previous node.
has a next reference variable and a back reference variable
contains the address of the next node (except the last node)
contains the address of the previous node (except the first node)
Traversal can happened in both direction
Stack
Concept
Application
Implementation