SlideShare a Scribd company logo
Link List
• Arrangement of data in memory
• There are different ways to arrange data in
memory ,
• Array store data sequentially and in cotigious
memory locations that is not either possible nor
efficient in large computer system as
– There should not be enough memory , but there may be
enough blocks
– Array is static data structure
– Access is slow
• To overcome these problems we use link list
What is link list
– linked list is a data structure that consists of
a sequence of data records such that in each
record there is a field that contains a
reference (i.e., a link) to the next record in the
sequence.
– In link list data is arrange in records
• Each record is called node
• Data item may be store anywhere in memory
• Each node consist of data and pointer to next item
• Mean the items are connected logically
Advantages of link list
• Dynamically allocated data structures can
be linked together to form a chain.
• A linked list is a series of connected
nodes (or links) where each node is a
data structure.
• A linked list can grow or shrink in size as
the program runs.
• because the nodes in a linked list are dynamically
allocated.
Single link list
– Singular link list
• Linear collection of data items
• Visiting the elements be from start side to end side
• Y this is called one way link list
• Each node consist of two nodes ,first contain data
and the second contain the pointer to next
• The last node consist pointer NULL while start
variable contain address of first element ,it is also
called list pointer variable
Link list
Link list operations
• The important operations are
• Traversing
– It is visited form start to end when NULL occur ,so visiting
each element is called traversing
• Insertion
– How to insert a new item in list , at beginning ,at the End
, and it Middle
• Deletion
– How to Delete an item in list , at beginning ,at the End ,
and it Middle
• Searching
– To search for an item in the list.
• Sorting
– So sort the elements in an order…
Representation in Memory
• The items of link list are stored in memory in
scattered form but these are linked through
pointers
• Each item is called an object ,while each object
contain at least two fields ,one for to store the data
while other one is for next node address
Circular link list
• A link list in which the last node of the list
points back to the first node of the list is
called circular link list
Double Link list
• A list in which each node has the address
both of next and previous node is called
Double Link list
• It can be visited in both directions
• In singular list we can’t go back from current node
to previous node .while we can in double l.list
• Its also called two way list
• Each node consist of three field
• One store the data
• 2nd store the address of previous node
• 3rd store the address of next node
2- link-list.ppt
Double Link list operations
• The important operations are
• Traversing
– It is visited form start to end when NULL occur ,so visiting each
element is called traversing ,we do in both directions
• Insertion
– How to insert a new item in list , at beginning ,at the End , and it
Middle
• Deletion
– How to Delete an item in list , at beginning ,at the End , and it
Middle
• Searching
– To search for an item in the list as array
• Sorting
– So sort the elements in an order…
• Operation Name Description
• createList() Create a new list (presumably empty)
• copy() Set one list to be a copy of another
• clear(); Clear a list (remove all elements)
• insert(X, ?) Insert element X at a particular position in the list
• remove(?) Remove element at some position in the list
• get(?) Get element at a given position
• update(X, ?) Replace the element at a given position with X
• find(X) Determine if the element X is in the list
• length() Returns the length of the list.
• Functions Description
• start() Moves the “current” pointer to the very first element
• tail() Moves the “current” pointer to the very last element
• next() Move the current position forward one element
• back() Move the current position backward one element
2- link-list.ppt

More Related Content

PPTX
Linked list
PPTX
Data Structures-UNIT Four_Linked_List.pptx
PPTX
Linked list (1).pptx
PPTX
linked list in data structure
PPTX
data structures and applications power p
PDF
ds-lecture-4-171012041008 (1).pdf
PPTX
DSL Unit 4 (Linked list) (PPT)SE3rd sem sppu.pptx
PPTX
linked list in dsa python (presentation)
Linked list
Data Structures-UNIT Four_Linked_List.pptx
Linked list (1).pptx
linked list in data structure
data structures and applications power p
ds-lecture-4-171012041008 (1).pdf
DSL Unit 4 (Linked list) (PPT)SE3rd sem sppu.pptx
linked list in dsa python (presentation)

Similar to 2- link-list.ppt (20)

PPT
lecture 02.2.ppt
PPTX
Introduction to linked list in data structure.pptx
PPTX
Linked list, Singly link list and its operations
PDF
Linked list (introduction) 1
PPTX
DATA STRUCTURE AND ALGORITHM with linked list
DOC
Linked List
PPTX
Linked lists linked lists vs Arrays.pptx
PPT
Link List
DOCX
Link list assi
PPT
Linked lists
PPTX
linked list in Data Structure, Simple and Easy Tutorial
PPT
Linkedlists
PDF
Data structure
PPTX
Engineering.CSE.DataStructure.Linkedlist.notes
PPTX
Linear data structure concepts
PDF
Static arrays are structures whose size is fixed at compile time and.pdf
PPTX
Lec3-Linked list.pptx
PPTX
DATA STRUCTURES AND LINKED LISTS IN C.pptx
PPTX
DATA STRUCTURES AND LINKED LISTS IN C.pptx
lecture 02.2.ppt
Introduction to linked list in data structure.pptx
Linked list, Singly link list and its operations
Linked list (introduction) 1
DATA STRUCTURE AND ALGORITHM with linked list
Linked List
Linked lists linked lists vs Arrays.pptx
Link List
Link list assi
Linked lists
linked list in Data Structure, Simple and Easy Tutorial
Linkedlists
Data structure
Engineering.CSE.DataStructure.Linkedlist.notes
Linear data structure concepts
Static arrays are structures whose size is fixed at compile time and.pdf
Lec3-Linked list.pptx
DATA STRUCTURES AND LINKED LISTS IN C.pptx
DATA STRUCTURES AND LINKED LISTS IN C.pptx
Ad

Recently uploaded (20)

PPT
Predictive modeling basics in data cleaning process
PPTX
climate analysis of Dhaka ,Banglades.pptx
PDF
Galatica Smart Energy Infrastructure Startup Pitch Deck
PDF
Transcultural that can help you someday.
PPTX
SAP 2 completion done . PRESENTATION.pptx
PPTX
QUANTUM_COMPUTING_AND_ITS_POTENTIAL_APPLICATIONS[2].pptx
PDF
Mega Projects Data Mega Projects Data
PDF
Introduction to Data Science and Data Analysis
PDF
Capcut Pro Crack For PC Latest Version {Fully Unlocked 2025}
PPTX
Topic 5 Presentation 5 Lesson 5 Corporate Fin
PPTX
Managing Community Partner Relationships
PPTX
Modelling in Business Intelligence , information system
PDF
REAL ILLUMINATI AGENT IN KAMPALA UGANDA CALL ON+256765750853/0705037305
PPTX
(Ali Hamza) Roll No: (F24-BSCS-1103).pptx
PPTX
mbdjdhjjodule 5-1 rhfhhfjtjjhafbrhfnfbbfnb
PPTX
Acceptance and paychological effects of mandatory extra coach I classes.pptx
PDF
22.Patil - Early prediction of Alzheimer’s disease using convolutional neural...
PPTX
iec ppt-1 pptx icmr ppt on rehabilitation.pptx
PDF
Data Engineering Interview Questions & Answers Cloud Data Stacks (AWS, Azure,...
PPTX
Qualitative Qantitative and Mixed Methods.pptx
Predictive modeling basics in data cleaning process
climate analysis of Dhaka ,Banglades.pptx
Galatica Smart Energy Infrastructure Startup Pitch Deck
Transcultural that can help you someday.
SAP 2 completion done . PRESENTATION.pptx
QUANTUM_COMPUTING_AND_ITS_POTENTIAL_APPLICATIONS[2].pptx
Mega Projects Data Mega Projects Data
Introduction to Data Science and Data Analysis
Capcut Pro Crack For PC Latest Version {Fully Unlocked 2025}
Topic 5 Presentation 5 Lesson 5 Corporate Fin
Managing Community Partner Relationships
Modelling in Business Intelligence , information system
REAL ILLUMINATI AGENT IN KAMPALA UGANDA CALL ON+256765750853/0705037305
(Ali Hamza) Roll No: (F24-BSCS-1103).pptx
mbdjdhjjodule 5-1 rhfhhfjtjjhafbrhfnfbbfnb
Acceptance and paychological effects of mandatory extra coach I classes.pptx
22.Patil - Early prediction of Alzheimer’s disease using convolutional neural...
iec ppt-1 pptx icmr ppt on rehabilitation.pptx
Data Engineering Interview Questions & Answers Cloud Data Stacks (AWS, Azure,...
Qualitative Qantitative and Mixed Methods.pptx
Ad

2- link-list.ppt

  • 1. Link List • Arrangement of data in memory • There are different ways to arrange data in memory , • Array store data sequentially and in cotigious memory locations that is not either possible nor efficient in large computer system as – There should not be enough memory , but there may be enough blocks – Array is static data structure – Access is slow • To overcome these problems we use link list
  • 2. What is link list – linked list is a data structure that consists of a sequence of data records such that in each record there is a field that contains a reference (i.e., a link) to the next record in the sequence. – In link list data is arrange in records • Each record is called node • Data item may be store anywhere in memory • Each node consist of data and pointer to next item • Mean the items are connected logically
  • 3. Advantages of link list • Dynamically allocated data structures can be linked together to form a chain. • A linked list is a series of connected nodes (or links) where each node is a data structure. • A linked list can grow or shrink in size as the program runs. • because the nodes in a linked list are dynamically allocated.
  • 4. Single link list – Singular link list • Linear collection of data items • Visiting the elements be from start side to end side • Y this is called one way link list • Each node consist of two nodes ,first contain data and the second contain the pointer to next • The last node consist pointer NULL while start variable contain address of first element ,it is also called list pointer variable
  • 6. Link list operations • The important operations are • Traversing – It is visited form start to end when NULL occur ,so visiting each element is called traversing • Insertion – How to insert a new item in list , at beginning ,at the End , and it Middle • Deletion – How to Delete an item in list , at beginning ,at the End , and it Middle • Searching – To search for an item in the list. • Sorting – So sort the elements in an order…
  • 7. Representation in Memory • The items of link list are stored in memory in scattered form but these are linked through pointers • Each item is called an object ,while each object contain at least two fields ,one for to store the data while other one is for next node address
  • 8. Circular link list • A link list in which the last node of the list points back to the first node of the list is called circular link list
  • 9. Double Link list • A list in which each node has the address both of next and previous node is called Double Link list • It can be visited in both directions • In singular list we can’t go back from current node to previous node .while we can in double l.list • Its also called two way list • Each node consist of three field • One store the data • 2nd store the address of previous node • 3rd store the address of next node
  • 11. Double Link list operations • The important operations are • Traversing – It is visited form start to end when NULL occur ,so visiting each element is called traversing ,we do in both directions • Insertion – How to insert a new item in list , at beginning ,at the End , and it Middle • Deletion – How to Delete an item in list , at beginning ,at the End , and it Middle • Searching – To search for an item in the list as array • Sorting – So sort the elements in an order…
  • 12. • Operation Name Description • createList() Create a new list (presumably empty) • copy() Set one list to be a copy of another • clear(); Clear a list (remove all elements) • insert(X, ?) Insert element X at a particular position in the list • remove(?) Remove element at some position in the list • get(?) Get element at a given position • update(X, ?) Replace the element at a given position with X • find(X) Determine if the element X is in the list • length() Returns the length of the list.
  • 13. • Functions Description • start() Moves the “current” pointer to the very first element • tail() Moves the “current” pointer to the very last element • next() Move the current position forward one element • back() Move the current position backward one element