SlideShare a Scribd company logo
Created by Zaheer Abbas Aghani
LIST STRUCTURE LINKED LIST Lecture #10
What is a List? In computer science, a list is a collection of entities/items .  OR List is a collection of short pieces of information such as names of peoples or list of groceries etc. List is among the most generic of data structure. It is usually used in the daily life routine E.g.  birthday list of friends. shopping list etc.
Nature of List Structure  List is a collection of items that are all of same type. The items or elements of list are stored in some particular order. It is possible to insert new elements into various position in list and remove any element of list. The order is important here. It is not just a random collection it is an ordered collection.
List Implementation Lists are usually implemented using  different data structure. There are two main ways to implement lists into memory. One way to store such data is by means of arrays, but array have certain disadvantages  e.g. It is relatively expensive to insert and delete elements. it occupies a block of memory space, one can not increase the size of array when space is required.
Another way of storing list in memory to have each element in the list contain field called link or pointer. Pointer contains the address of next element in the list. Thus successive element in the list need not occupy adjacent space in memory. If some one is interested in searching through data for inserting and deleting as in word processing one would not store data in an array but rather in list using pointers. This type of data structure is called a linked list
Linked List A linked list, or one way list is a linear collection of data elements called nodes, where each element contains a pointer to the next element. OR A linked list is a data structure where every element contains both a 'value' and a link/reference/pointer to a 'next' element. The whole list is represented by a pointer/reference/link to the first element of the list.
Linked list continue…..  In computer science, a linked list is one of the fundamental data structure, and can be used to implement other data structure.  Its consists of sequences of nodes, each contain arbitrary data fields and one or two references (links) pointing to the next and /or pervious nodes. linked lists allocate memory for each element separately and only when necessary. A linked list is also called self-referential data type because it contains a pointer or link to other datum of same type.
What Linked Lists Look Like An array allocates memory for all its elements lumped together as one block of memory. In contrast, a  linked   list  allocates space for each element separately in its own block of memory called a " linked   list  element" or "node". The  list  gets is overall structure by using pointers to connect all its nodes together like the links in a chain Each node contains two fields: a "data" field to store whatever element type the  list  holds and a "next" field which is a pointer used to link one node to the next node. Linked lists sometimes have a special  dummy  or sentinel node at the beginning and/or at the end of the list, which is not used to store data. Its purpose is to simplify or speed up some operations, by ensuring that every data node always has a previous and/or next node, and that every list (even one that contains no data elements) always has a "first" and "last" node.
. Above is a schematic diagram of a linked list with 5 nodes. Each node contain two parts i.e.   the left part represents the information part of the    node.   the right part represents the next pointer field of    the node. Start points to the first element of list and the pointer of last node contain a special value, called the null pointer, which is any invalid address. x start

More Related Content

PPT
Lecture 2b lists
PPTX
Linked Lists
PPTX
Standard Algorithms
PPTX
Using microsoft excel
PDF
Worksheet and workbooks linking
PPTX
Data structures
PPT
7 files
PPTX
Sql server ___________session_17(indexes)
Lecture 2b lists
Linked Lists
Standard Algorithms
Using microsoft excel
Worksheet and workbooks linking
Data structures
7 files
Sql server ___________session_17(indexes)

What's hot (19)

PPTX
Create table relationships
PPTX
Data structures and algorithms lab6
PPTX
Dbms logical dependance
PPTX
Abap dictionary 1
PPTX
Linked list
PPT
Database relatinship
PDF
08 Tabulation
PPT
ISDD Database Structure N5
PPTX
Presenting data: data tables
PPTX
Reconciliation Tool
PPT
ABAP Material 05
PDF
Analyzing Citations using Web of Science
PPTX
Cleap up your data (Techniques and tips)
PPT
Vermont Online Library: introduction
PPT
Poli Sci2008
PDF
Share with your friends: resources in common
Create table relationships
Data structures and algorithms lab6
Dbms logical dependance
Abap dictionary 1
Linked list
Database relatinship
08 Tabulation
ISDD Database Structure N5
Presenting data: data tables
Reconciliation Tool
ABAP Material 05
Analyzing Citations using Web of Science
Cleap up your data (Techniques and tips)
Vermont Online Library: introduction
Poli Sci2008
Share with your friends: resources in common
Ad

Viewers also liked (8)

PPT
Lect 1-2 Zaheer Abbas
PPT
Lect 8(pointers) Zaheer Abbas
PPT
Lect 19 Zaheer Abbas
PPT
Lect 3-4 Zaheer Abbas
PPT
Lect 15-16 Zaheer Abbas
PPT
Lect 17-18 Zaheer Abbas
PPT
Lect 13 Zaheer Abbas
PPT
Lect 14 Zaheer Abbas
Lect 1-2 Zaheer Abbas
Lect 8(pointers) Zaheer Abbas
Lect 19 Zaheer Abbas
Lect 3-4 Zaheer Abbas
Lect 15-16 Zaheer Abbas
Lect 17-18 Zaheer Abbas
Lect 13 Zaheer Abbas
Lect 14 Zaheer Abbas
Ad

Similar to Lect 10 Zaheer Abbas (20)

PPTX
linked list in dsa python (presentation)
PPTX
Data Structures-UNIT Four_Linked_List.pptx
PDF
Static arrays are structures whose size is fixed at compile time and.pdf
PPTX
DSL Unit 4 (Linked list) (PPT)SE3rd sem sppu.pptx
PPTX
Key,ID Field and Tables Relationship
PPTX
linked list.pptx
PPT
PpptPresentationSilgkeLinkListpython.ppt
PPT
03. Linked List-1 (1) for beginners .ppt
PPTX
link list.pptx complete notes detailed ans
PPTX
Linked lists 1
PDF
2. Introduction to Data Structure.pdf
PPTX
Linked list
PDF
Data Structures and Algorithms-DSA_Linkedlist_class 1.pdf
PDF
Link list
PPTX
Introduction to linked list in data structure.pptx
PDF
Introduction to Data Structure
PPTX
Engineering.CSE.DataStructure.Linkedlist.notes
PDF
UNITIII LDS.pdf
PPT
linked_lists.ppt linked_lists linked_lists
PPTX
Datastucture-Unit 4-Linked List Presentation.pptx
linked list in dsa python (presentation)
Data Structures-UNIT Four_Linked_List.pptx
Static arrays are structures whose size is fixed at compile time and.pdf
DSL Unit 4 (Linked list) (PPT)SE3rd sem sppu.pptx
Key,ID Field and Tables Relationship
linked list.pptx
PpptPresentationSilgkeLinkListpython.ppt
03. Linked List-1 (1) for beginners .ppt
link list.pptx complete notes detailed ans
Linked lists 1
2. Introduction to Data Structure.pdf
Linked list
Data Structures and Algorithms-DSA_Linkedlist_class 1.pdf
Link list
Introduction to linked list in data structure.pptx
Introduction to Data Structure
Engineering.CSE.DataStructure.Linkedlist.notes
UNITIII LDS.pdf
linked_lists.ppt linked_lists linked_lists
Datastucture-Unit 4-Linked List Presentation.pptx

More from Information Technology Center (8)

PDF
It3 4 by Zaheer Abbas Aghani
DOC
Flip & flop by Zaheer Abbas Aghani
DOC
C# by Zaheer Abbas Aghani
DOC
C# by Zaheer Abbas Aghani
PPT
Lect 22 Zaheer Abbas
PPT
Lect 21 Zaheer Abbas
PPT
Lect 11-12 Zaheer Abbas
PPT
Lect 9(pointers) Zaheer Abbas
It3 4 by Zaheer Abbas Aghani
Flip & flop by Zaheer Abbas Aghani
C# by Zaheer Abbas Aghani
C# by Zaheer Abbas Aghani
Lect 22 Zaheer Abbas
Lect 21 Zaheer Abbas
Lect 11-12 Zaheer Abbas
Lect 9(pointers) Zaheer Abbas

Recently uploaded (20)

PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Accuracy of neural networks in brain wave diagnosis of schizophrenia
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Hybrid model detection and classification of lung cancer
PDF
Univ-Connecticut-ChatGPT-Presentaion.pdf
PDF
Heart disease approach using modified random forest and particle swarm optimi...
PPTX
Tartificialntelligence_presentation.pptx
PPTX
A Presentation on Artificial Intelligence
PPTX
SOPHOS-XG Firewall Administrator PPT.pptx
PDF
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PPTX
cloud_computing_Infrastucture_as_cloud_p
PPTX
OMC Textile Division Presentation 2021.pptx
PDF
A comparative analysis of optical character recognition models for extracting...
PDF
August Patch Tuesday
PDF
Microsoft Solutions Partner Drive Digital Transformation with D365.pdf
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Hindi spoken digit analysis for native and non-native speakers
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Accuracy of neural networks in brain wave diagnosis of schizophrenia
gpt5_lecture_notes_comprehensive_20250812015547.pdf
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Hybrid model detection and classification of lung cancer
Univ-Connecticut-ChatGPT-Presentaion.pdf
Heart disease approach using modified random forest and particle swarm optimi...
Tartificialntelligence_presentation.pptx
A Presentation on Artificial Intelligence
SOPHOS-XG Firewall Administrator PPT.pptx
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
Building Integrated photovoltaic BIPV_UPV.pdf
Assigned Numbers - 2025 - Bluetooth® Document
cloud_computing_Infrastucture_as_cloud_p
OMC Textile Division Presentation 2021.pptx
A comparative analysis of optical character recognition models for extracting...
August Patch Tuesday
Microsoft Solutions Partner Drive Digital Transformation with D365.pdf
Unlocking AI with Model Context Protocol (MCP)
Hindi spoken digit analysis for native and non-native speakers

Lect 10 Zaheer Abbas

  • 1. Created by Zaheer Abbas Aghani
  • 2. LIST STRUCTURE LINKED LIST Lecture #10
  • 3. What is a List? In computer science, a list is a collection of entities/items . OR List is a collection of short pieces of information such as names of peoples or list of groceries etc. List is among the most generic of data structure. It is usually used in the daily life routine E.g. birthday list of friends. shopping list etc.
  • 4. Nature of List Structure List is a collection of items that are all of same type. The items or elements of list are stored in some particular order. It is possible to insert new elements into various position in list and remove any element of list. The order is important here. It is not just a random collection it is an ordered collection.
  • 5. List Implementation Lists are usually implemented using different data structure. There are two main ways to implement lists into memory. One way to store such data is by means of arrays, but array have certain disadvantages e.g. It is relatively expensive to insert and delete elements. it occupies a block of memory space, one can not increase the size of array when space is required.
  • 6. Another way of storing list in memory to have each element in the list contain field called link or pointer. Pointer contains the address of next element in the list. Thus successive element in the list need not occupy adjacent space in memory. If some one is interested in searching through data for inserting and deleting as in word processing one would not store data in an array but rather in list using pointers. This type of data structure is called a linked list
  • 7. Linked List A linked list, or one way list is a linear collection of data elements called nodes, where each element contains a pointer to the next element. OR A linked list is a data structure where every element contains both a 'value' and a link/reference/pointer to a 'next' element. The whole list is represented by a pointer/reference/link to the first element of the list.
  • 8. Linked list continue….. In computer science, a linked list is one of the fundamental data structure, and can be used to implement other data structure. Its consists of sequences of nodes, each contain arbitrary data fields and one or two references (links) pointing to the next and /or pervious nodes. linked lists allocate memory for each element separately and only when necessary. A linked list is also called self-referential data type because it contains a pointer or link to other datum of same type.
  • 9. What Linked Lists Look Like An array allocates memory for all its elements lumped together as one block of memory. In contrast, a linked list allocates space for each element separately in its own block of memory called a " linked list element" or "node". The list gets is overall structure by using pointers to connect all its nodes together like the links in a chain Each node contains two fields: a "data" field to store whatever element type the list holds and a "next" field which is a pointer used to link one node to the next node. Linked lists sometimes have a special dummy or sentinel node at the beginning and/or at the end of the list, which is not used to store data. Its purpose is to simplify or speed up some operations, by ensuring that every data node always has a previous and/or next node, and that every list (even one that contains no data elements) always has a "first" and "last" node.
  • 10. . Above is a schematic diagram of a linked list with 5 nodes. Each node contain two parts i.e. the left part represents the information part of the node. the right part represents the next pointer field of the node. Start points to the first element of list and the pointer of last node contain a special value, called the null pointer, which is any invalid address. x start