Data Structures: Link List
Data Structures: Link List
LINK LIST
Linked List Representation
1. L i n k e d l i s t c a n b e v i s u a l i z e d a s a c h a i n o f n o d e s , w h e r e e v e r y n o d e p o i n t s
to the next node.
2. A s p e r t h e a b o v e i l l u s t r a t i o n , f o l l o w i n g a r e t h e i m p o r t a n t p o i n t s t o b e
considered.
• Linked List contains a link element called first.
• Each link carries a data field(s) and a link field called next.
• Each link is linked with its next link using its next link.
• Last link carries a link as null to mark the end of the list.
2
Types of link list
Following are the various types of
linked list.
• Simple Linked List − Item navigation is forward
only.
• Doubly Linked List − Items can be navigated
forward and backward.
• Circular Linked List − Last item contains link of
the first element as next and the first element
has a link to the last element as previous.
3
INTRODUCTION
LINK LIST
• A linked list is a sequence of data structures,
which are connected together via links.
• Linked List is a sequence of links which contains
items. Each link contains a connection to
another link. Linked list is the second most-used
data structure after array. Following are the
important terms to understand the concept of
Linked List.
• Link − Each link of a linked list can store a data
called an element.
• Next − Each link of a linked list contains a link to
the next link called Next.
• LinkedList − A Linked List contains the
connection link to the first link called First.
4
Basic
Operations
L E T ’ S D I V E I N
5
operations
Insertion
Adds an element
at the beginning
of the list.
Deletion
Deletes an
element at the
beginning of the
list.
Display Delete