SlideShare a Scribd company logo
14
Most read
15
Most read
16
Most read
LINKED LIST
Present by :
Sama MahammadAdil O.
Student
Computer science & engineering
INTRODUCTION
• Data structure :- A data structure is a logical representation of data and operation that can be
perform on the data.
There are two types of Data Structure :
1. Primitive Data Structure.
2. Non-Primitive Data Structure.
• 1. Primitive Data Structure :- Data which can directly operate by machine is known as
primitive data structure.
• These are the examples of primitive data structure Integer, Pointer, Char, Boolean etc.
• 2. Non-Primitive Data Structure :- Data which can not directly operate by machine but
need some algorithm to perform it’s task is known as non-primitive data structure.
• There are two types Non-Primitive Data Structure :
1. Linear Data Structure.
2. Non-Linear Data Structure.
 Linear Data Structure :- Linear data structure is in which all the data are arranged in
sequence.
These are the examples of Linear data structure Array, Stack, Queue, Linked List.
• Linked List :- Linked List is a linear data structure. It contains nodes. Each node contains two
parts, DATA part and LINK part.
DATA contains elements and
LINK contains address of another node.
LIMITATIONS OF ARRAYS
Arrays are simple to understand and elements of an array are easily accessible but have some
limitations.
Array have a fixed dimension.
Once the size of an array is decided it can not be change during execution.
Array elements always stored in continues memory locations.
Operations like insertion or deletion of the array elements are quite difficult.
To overcome this limitations we use Linked List.
LINKED LIST
• Linked list is a collection of elements called nodes.
• Each node contains two parts. They are DATA part and LINK part.
• The principal benefit of a linked list over a conventional array is that the list elements can easily
be inserted or removed without reallocation or reorganization of the entire structure because the
data items need not be stored contiguously in memory or on disk, while an array has to be
declared in the source code, before compiling and running the program.
• Linked lists allow insertion and removal of nodes at any point in the list.
NODE
Data Link
1000 2000 3000
[ LINKED LIST ]
• The above figure shows the example of marks obtained by different students can be stored in a
linked list.
• NULL indicates the end of the list.
25 2000 29 NULL26 3000
ADVANTAGES
• Linked lists are a dynamic data structure, allocating the needed memory while the program is
running.
• Insertion and deletion node operations are easily implemented in a linked list.
• Linear data structures such as stacks and queues are easily executed with a linked list.
• They can reduce access time and may expand in real time without memory overhead.
DISADVANTAGES
• They have a quite difficult to use more memory due to pointers requiring extra storage space.
• Nodes in a linked list must be read in order from the beginning as linked lists are
inherently sequential access.
• Nodes are stored in continuously, greatly increasing the time required to access individual
elements within the list.
• Difficulties arise in linked lists when it comes to reverse traversing. For instance, singly linked
lists are cumbersome to navigate backwards and while doubly linked lists are somewhat easier to
read, memory is wasted in allocating space for a back pointer.
OPERATIONS ON LINKED LIST
• The basic operations on linked list are :-
1. Creation
2. Insertion
3. Deletion
4. Traversing
5. Searching
6. Concatenation
7. Display
Creation :- Creation operation is used to create a new linked list.
Insertion :- Insertion operation is used to insert a new node in the linked list. A new node can
be inserted at the beginning of a linked list or at the end of linked list or at the specified position
of a linked list. If the list is empty, then the new node is inserted as a first node.
Deletion :- Deletion operation is used to delete a node from the linked list. It can be deleted
from the beginning of a linked list or from the end of linked list or from the specified position of
a linked list.
Traversing :- Traversing operation is a process of going through all the nodes of a linked list
from one end to the another end. If we start traversing from the very first node towards the last
node, it is called forward traversing. If we start traversing from the last node towards the first
node, it is called backward traversing.
Searching :- Searching operation is a process of accessing the desired node in the list. We start
searching node - by - node and compare the data of the node with the key.
Concatenation :- Concatenation operation is the process of appending the second list to the end
of the first list. When we concatenate two list, the resultant list become larger size.
Display :- Display operation is used to print each and every node’s information.
TYPES OF LINKED LIST
I. Single linked list.
II. Double linked list.
III. Circular linked list.
IV. Circular double linked list.
SINGLE LINKED LIST :-
• A single linked list is one in which all nodes are linked together in some sequential
manner.
• There is only one way traversal which is forward traversal.
• It is made of two parts Data and Link.
Data contains the element.
Link contains the address of next node.
• Last node link part contains null value which represents the end of the list. As shown in
below figure :
[ SINGLE LINKED LIST ]
Data Link Data NULLData Link
DOUBLE LINKED LIST :-
• A double linked list is one in which all nodes are linked together in some sequential
manner.
• There is two way traversal which are forward and backward traversals.
• It is made of three parts one Data and two Link.
Data contains the element.
First Link contains the address of previous node.
Second Link contains the address of next node.
• First node link and Last node link part contains null value which represents the end of
the list. As shown in below figure :
[ DOUBLE LINKED LIST ]
Prev
Link
DATA
NEXT
LINK
NULL DATA
NEXT
LINK
Prev
Link
DATA NULL
CIRCULAR LINKED LIST :-
• A circular linked list is one in which all nodes are linked together in some sequential
manner.
• There is only one way traversal in circular manner which is forward traversal.
• It is made of two parts Data and Link.
Data contains the element.
Link contains the address of next node.
• Last node link part contains the address of first node. As shown in below figure :
[ CIRCULAR LINKED LIST ]
Data Link Data LinkData Link
CIRCULAR DOUBLE LINKED LIST :-
• A circular double linked list is one in which all nodes are linked together in some sequential
manner.
• There is two way traversal in circular manner which are forward and backward traversals.
• It is made of three parts one Data and two Link.
Data contains the element.
First Link contains the address of previous node.
Second Link contains the address of next node.
• First node PREV link part contains the address of last node and Last node NEXT link part
contains the address of first node. As shown in below figure :
[ CIRCULAR DOUBLE LINKED LIST ]
Prev
Link
DATA
NEXT
LINK
PREV
LINK
DATA
NEXT
LINK
Prev
Link
DATA
NEXT
LINK

More Related Content

PPT
BINARY TREE REPRESENTATION.ppt
PDF
Binary tree
PPTX
linked list in data structure
PPTX
single linked list
PPTX
Presentation on queue
PPTX
Binary tree
PPTX
Linked list
PPTX
linked list in Data Structure, Simple and Easy Tutorial
BINARY TREE REPRESENTATION.ppt
Binary tree
linked list in data structure
single linked list
Presentation on queue
Binary tree
Linked list
linked list in Data Structure, Simple and Easy Tutorial

What's hot (20)

PPTX
Binary Tree in Data Structure
PPT
1.1 binary tree
PPTX
Trees (data structure)
PPTX
Binary Search Tree
PPT
Binary tree
PPT
Linked List
PPTX
Linked list
PPTX
Binary Search Tree
PPTX
Stacks IN DATA STRUCTURES
PPT
Data Structure and Algorithms Binary Search Tree
PPTX
Linked stacks and queues
PPTX
Queue ppt
PPTX
Doubly linked list (animated)
PPT
Skip list vinay khimsuriya_200430723005
PDF
linear search and binary search
PPTX
Arrays in Data Structure and Algorithm
PPTX
linked list
PPTX
POLYNOMIAL ADDITION USING LINKED LIST.pptx
PPTX
Stack & Queue using Linked List in Data Structure
PPT
Linked lists
Binary Tree in Data Structure
1.1 binary tree
Trees (data structure)
Binary Search Tree
Binary tree
Linked List
Linked list
Binary Search Tree
Stacks IN DATA STRUCTURES
Data Structure and Algorithms Binary Search Tree
Linked stacks and queues
Queue ppt
Doubly linked list (animated)
Skip list vinay khimsuriya_200430723005
linear search and binary search
Arrays in Data Structure and Algorithm
linked list
POLYNOMIAL ADDITION USING LINKED LIST.pptx
Stack & Queue using Linked List in Data Structure
Linked lists
Ad

Similar to Linked list (20)

PDF
ds-lecture-4-171012041008 (1).pdf
PPTX
Data Structures-UNIT Four_Linked_List.pptx
PPTX
Linked list (1).pptx
PPTX
data structures and applications power p
PPTX
Linked lists linked lists vs Arrays.pptx
PPT
Linkedlists
DOCX
Link list assi
PPTX
Data Structures and Algorithms - Lec 05.pptx
PPTX
Data Structures_Linked List
PPTX
DSL Unit 4 (Linked list) (PPT)SE3rd sem sppu.pptx
PPT
2- link-list.ppt
PPT
ANOITO2341988888888888888888888885555.ppt
PPT
Lecture 2b lists
PPTX
Linked list, Singly link list and its operations
PPTX
Data Structures Introduction & Linear DS
PPTX
Introduction to linked list in data structure.pptx
PPT
Link list using array in Data structure amd algorithms
PPTX
Data Structures(Part 1)
PPT
PPTX
Different types of Linked list.
ds-lecture-4-171012041008 (1).pdf
Data Structures-UNIT Four_Linked_List.pptx
Linked list (1).pptx
data structures and applications power p
Linked lists linked lists vs Arrays.pptx
Linkedlists
Link list assi
Data Structures and Algorithms - Lec 05.pptx
Data Structures_Linked List
DSL Unit 4 (Linked list) (PPT)SE3rd sem sppu.pptx
2- link-list.ppt
ANOITO2341988888888888888888888885555.ppt
Lecture 2b lists
Linked list, Singly link list and its operations
Data Structures Introduction & Linear DS
Introduction to linked list in data structure.pptx
Link list using array in Data structure amd algorithms
Data Structures(Part 1)
Different types of Linked list.
Ad

Recently uploaded (20)

PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PDF
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
PDF
Complications of Minimal Access Surgery at WLH
PPTX
master seminar digital applications in india
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PDF
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PPTX
Microbial diseases, their pathogenesis and prophylaxis
PDF
Computing-Curriculum for Schools in Ghana
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PPTX
Cell Structure & Organelles in detailed.
PPTX
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
PDF
01-Introduction-to-Information-Management.pdf
PDF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
PDF
Sports Quiz easy sports quiz sports quiz
FourierSeries-QuestionsWithAnswers(Part-A).pdf
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
Module 4: Burden of Disease Tutorial Slides S2 2025
2.FourierTransform-ShortQuestionswithAnswers.pdf
Complications of Minimal Access Surgery at WLH
master seminar digital applications in india
O5-L3 Freight Transport Ops (International) V1.pdf
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
Supply Chain Operations Speaking Notes -ICLT Program
Microbial diseases, their pathogenesis and prophylaxis
Computing-Curriculum for Schools in Ghana
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
Cell Structure & Organelles in detailed.
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
01-Introduction-to-Information-Management.pdf
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
102 student loan defaulters named and shamed – Is someone you know on the list?
Sports Quiz easy sports quiz sports quiz

Linked list

  • 1. LINKED LIST Present by : Sama MahammadAdil O. Student Computer science & engineering
  • 2. INTRODUCTION • Data structure :- A data structure is a logical representation of data and operation that can be perform on the data. There are two types of Data Structure : 1. Primitive Data Structure. 2. Non-Primitive Data Structure. • 1. Primitive Data Structure :- Data which can directly operate by machine is known as primitive data structure. • These are the examples of primitive data structure Integer, Pointer, Char, Boolean etc.
  • 3. • 2. Non-Primitive Data Structure :- Data which can not directly operate by machine but need some algorithm to perform it’s task is known as non-primitive data structure. • There are two types Non-Primitive Data Structure : 1. Linear Data Structure. 2. Non-Linear Data Structure.  Linear Data Structure :- Linear data structure is in which all the data are arranged in sequence. These are the examples of Linear data structure Array, Stack, Queue, Linked List. • Linked List :- Linked List is a linear data structure. It contains nodes. Each node contains two parts, DATA part and LINK part. DATA contains elements and LINK contains address of another node.
  • 4. LIMITATIONS OF ARRAYS Arrays are simple to understand and elements of an array are easily accessible but have some limitations. Array have a fixed dimension. Once the size of an array is decided it can not be change during execution. Array elements always stored in continues memory locations. Operations like insertion or deletion of the array elements are quite difficult. To overcome this limitations we use Linked List.
  • 5. LINKED LIST • Linked list is a collection of elements called nodes. • Each node contains two parts. They are DATA part and LINK part. • The principal benefit of a linked list over a conventional array is that the list elements can easily be inserted or removed without reallocation or reorganization of the entire structure because the data items need not be stored contiguously in memory or on disk, while an array has to be declared in the source code, before compiling and running the program. • Linked lists allow insertion and removal of nodes at any point in the list. NODE Data Link
  • 6. 1000 2000 3000 [ LINKED LIST ] • The above figure shows the example of marks obtained by different students can be stored in a linked list. • NULL indicates the end of the list. 25 2000 29 NULL26 3000
  • 7. ADVANTAGES • Linked lists are a dynamic data structure, allocating the needed memory while the program is running. • Insertion and deletion node operations are easily implemented in a linked list. • Linear data structures such as stacks and queues are easily executed with a linked list. • They can reduce access time and may expand in real time without memory overhead.
  • 8. DISADVANTAGES • They have a quite difficult to use more memory due to pointers requiring extra storage space. • Nodes in a linked list must be read in order from the beginning as linked lists are inherently sequential access. • Nodes are stored in continuously, greatly increasing the time required to access individual elements within the list. • Difficulties arise in linked lists when it comes to reverse traversing. For instance, singly linked lists are cumbersome to navigate backwards and while doubly linked lists are somewhat easier to read, memory is wasted in allocating space for a back pointer.
  • 9. OPERATIONS ON LINKED LIST • The basic operations on linked list are :- 1. Creation 2. Insertion 3. Deletion 4. Traversing 5. Searching 6. Concatenation 7. Display
  • 10. Creation :- Creation operation is used to create a new linked list. Insertion :- Insertion operation is used to insert a new node in the linked list. A new node can be inserted at the beginning of a linked list or at the end of linked list or at the specified position of a linked list. If the list is empty, then the new node is inserted as a first node. Deletion :- Deletion operation is used to delete a node from the linked list. It can be deleted from the beginning of a linked list or from the end of linked list or from the specified position of a linked list. Traversing :- Traversing operation is a process of going through all the nodes of a linked list from one end to the another end. If we start traversing from the very first node towards the last node, it is called forward traversing. If we start traversing from the last node towards the first node, it is called backward traversing.
  • 11. Searching :- Searching operation is a process of accessing the desired node in the list. We start searching node - by - node and compare the data of the node with the key. Concatenation :- Concatenation operation is the process of appending the second list to the end of the first list. When we concatenate two list, the resultant list become larger size. Display :- Display operation is used to print each and every node’s information.
  • 12. TYPES OF LINKED LIST I. Single linked list. II. Double linked list. III. Circular linked list. IV. Circular double linked list.
  • 13. SINGLE LINKED LIST :- • A single linked list is one in which all nodes are linked together in some sequential manner. • There is only one way traversal which is forward traversal. • It is made of two parts Data and Link. Data contains the element. Link contains the address of next node. • Last node link part contains null value which represents the end of the list. As shown in below figure : [ SINGLE LINKED LIST ] Data Link Data NULLData Link
  • 14. DOUBLE LINKED LIST :- • A double linked list is one in which all nodes are linked together in some sequential manner. • There is two way traversal which are forward and backward traversals. • It is made of three parts one Data and two Link. Data contains the element. First Link contains the address of previous node. Second Link contains the address of next node. • First node link and Last node link part contains null value which represents the end of the list. As shown in below figure : [ DOUBLE LINKED LIST ] Prev Link DATA NEXT LINK NULL DATA NEXT LINK Prev Link DATA NULL
  • 15. CIRCULAR LINKED LIST :- • A circular linked list is one in which all nodes are linked together in some sequential manner. • There is only one way traversal in circular manner which is forward traversal. • It is made of two parts Data and Link. Data contains the element. Link contains the address of next node. • Last node link part contains the address of first node. As shown in below figure : [ CIRCULAR LINKED LIST ] Data Link Data LinkData Link
  • 16. CIRCULAR DOUBLE LINKED LIST :- • A circular double linked list is one in which all nodes are linked together in some sequential manner. • There is two way traversal in circular manner which are forward and backward traversals. • It is made of three parts one Data and two Link. Data contains the element. First Link contains the address of previous node. Second Link contains the address of next node. • First node PREV link part contains the address of last node and Last node NEXT link part contains the address of first node. As shown in below figure : [ CIRCULAR DOUBLE LINKED LIST ] Prev Link DATA NEXT LINK PREV LINK DATA NEXT LINK Prev Link DATA NEXT LINK