Professional Documents
Culture Documents
LECTURE:5-8
INTRODUCTION
3
• Linked list is a liner data structure consisting of
elements called nodes where each node is
composed of two parts:
• Information part .
• Link part (called next pointer part)
• The information part contains user supplied data
and the link part is a pointer which points to the
next node in the linked list.
• The link part of the last node is set to NULL that
marks the end of the list
Representation of Link List in Memory
12 Nelson 9
• A linked list may not contain any node at all.Such a
list with no nodes at all is called an empty list.The
empty list is represented by setting the HEAD
pointer to NULL value.
• START or HEAD pointer is a special pointer which
points to the first node of the linked list.
• Linked list is a dynamic data structure as number of
elements are not pre-defined.Any number of
elements can be added or deleted easily.
• Linked list is also a linear data strucutre.
• Although the nodes are stored independently (i.e at
different memory locations),linearity is provided by
the links that binds them together.
• Linked lists are useful in applications where access
of elements is not at random and dynamic memory
allocation and deallocation of data elements are
frequently needed.
OPERATIONS ON LINKED LIST