SlideShare a Scribd company logo
Unit 4
LINKED
LIST
www.bcanotesnepal.com
Introduction to List and Linked Lists
• List is a term used to refer to a linear collection of data items. A List can be
implemented either by using arrays or linked lists.
• Usually, a large block of memory is occupied by an array which may not be
in use and it is difficult to increase the size of an array.
• Another way of storing a list is to have each element in a list contain a field
called a link or pointer, which contains the address of the next element in
the list.
www.bcanotesnepal.com
• The successive elements in the list need not occupy adjacent space in
memory. This type of data structure is called a linked list.
2
Linked List
• It is the most commonly used data structure used to store similar
type of data in memory.
• The elements of a linked list are not stored in adjacent memory
locations as in arrays.
www.bcanotesnepal.com
• It is a linear collection of data elements, called nodes, where
the linear order is implemented by means of pointers.
www.bcanotesnepal.com
SPecial Thanks To: Prashant sir. 3
Linked List
4
• Ina linear or single-linked list, a node is connected to the next node by
a single link.
www.bcanotesnepal.com
• A node in this type of linked list contains two types of fields
• data: which holds a list element
• next: which stores a link (i.e. pointer) to the next node in the list.
,.. I
Linked List
• The structure defined for a single linked list is implemented as follows:
struct Node{
int
info;
struct Node * next;
5
• The structure declared for linear linked list holds two members
• An integer type variable 'data' which holds the elements and
• Another type 'node', which has next, which stores the address of the next
node in the list.
www.bcanotesnepal.com

More Related Content

Similar to Link List : Introduction to List and Linked Lists (20)

Linear Data Structures - List, Stack and Queue
Linear Data Structures - List, Stack and Queue
Selvaraj Seerangan
 
ALGORITHM ANALYSIS AND LISTS ABSTACTS DT
ALGORITHM ANALYSIS AND LISTS ABSTACTS DT
mohanrajm63
 
Introduction to Data Structures and Linked List
Introduction to Data Structures and Linked List
Selvaraj Seerangan
 
Linked list
Linked list
MahammadAdil
 
Data Structures and Algorithms - Lec 05.pptx
Data Structures and Algorithms - Lec 05.pptx
RameshaFernando2
 
Lecture 2 - Linear Data Structures & Implementation.pptx
Lecture 2 - Linear Data Structures & Implementation.pptx
michaelsayuni29
 
Lecture 2b lists
Lecture 2b lists
Victor Palmar
 
Data Structures-UNIT Four_Linked_List.pptx
Data Structures-UNIT Four_Linked_List.pptx
shilpar780389
 
2- link-list.ppt
2- link-list.ppt
zabihniazai1
 
BCA DATA STRUCTURES INTRODUCTION AND OVERVIEW SOWMYA JYOTHI
BCA DATA STRUCTURES INTRODUCTION AND OVERVIEW SOWMYA JYOTHI
Sowmya Jyothi
 
Linked list
Linked list
kalpanasatishkumar
 
DLL DATA STRUCT.pptx
DLL DATA STRUCT.pptx
Muwaffiqa
 
unit 1.pptx
unit 1.pptx
ssuser7922b8
 
Data structure day 2
Data structure day 2
Mohammed Elsdody
 
CSE_D:11:_Somnath Mallick_3rd semister.pdf
CSE_D:11:_Somnath Mallick_3rd semister.pdf
Somnathmallick8
 
mbit_Unit-2_Linked List.pptx
mbit_Unit-2_Linked List.pptx
jotaro11
 
DSA - Copy.pptx
DSA - Copy.pptx
BishalChowdhury10
 
Linked List.pptx
Linked List.pptx
GhufranKhan42
 
Introduction to data structures (ss)
Introduction to data structures (ss)
Madishetty Prathibha
 
Different types of Linked list.
Different types of Linked list.
JAYANTA OJHA
 
Linear Data Structures - List, Stack and Queue
Linear Data Structures - List, Stack and Queue
Selvaraj Seerangan
 
ALGORITHM ANALYSIS AND LISTS ABSTACTS DT
ALGORITHM ANALYSIS AND LISTS ABSTACTS DT
mohanrajm63
 
Introduction to Data Structures and Linked List
Introduction to Data Structures and Linked List
Selvaraj Seerangan
 
Data Structures and Algorithms - Lec 05.pptx
Data Structures and Algorithms - Lec 05.pptx
RameshaFernando2
 
Lecture 2 - Linear Data Structures & Implementation.pptx
Lecture 2 - Linear Data Structures & Implementation.pptx
michaelsayuni29
 
Data Structures-UNIT Four_Linked_List.pptx
Data Structures-UNIT Four_Linked_List.pptx
shilpar780389
 
BCA DATA STRUCTURES INTRODUCTION AND OVERVIEW SOWMYA JYOTHI
BCA DATA STRUCTURES INTRODUCTION AND OVERVIEW SOWMYA JYOTHI
Sowmya Jyothi
 
DLL DATA STRUCT.pptx
DLL DATA STRUCT.pptx
Muwaffiqa
 
CSE_D:11:_Somnath Mallick_3rd semister.pdf
CSE_D:11:_Somnath Mallick_3rd semister.pdf
Somnathmallick8
 
mbit_Unit-2_Linked List.pptx
mbit_Unit-2_Linked List.pptx
jotaro11
 
Introduction to data structures (ss)
Introduction to data structures (ss)
Madishetty Prathibha
 
Different types of Linked list.
Different types of Linked list.
JAYANTA OJHA
 

More from Anil Yadav (20)

Link List REPRESENTATION OF DOUBLY LINKED LIST
Link List REPRESENTATION OF DOUBLY LINKED LIST
Anil Yadav
 
ALGORITHM FOR PUSHING AN ELEMENT TO A QUEUE
ALGORITHM FOR PUSHING AN ELEMENT TO A QUEUE
Anil Yadav
 
Link List STACK and Queue USING LINKED LIST
Link List STACK and Queue USING LINKED LIST
Anil Yadav
 
Link List Programming Linked List in Cpp
Link List Programming Linked List in Cpp
Anil Yadav
 
Link List & ALGORITHM FOR DELETING A NODE
Link List & ALGORITHM FOR DELETING A NODE
Anil Yadav
 
Link List ALGORITHM FOR INSERTING A NODE
Link List ALGORITHM FOR INSERTING A NODE
Anil Yadav
 
Presentations Linked Lists Data Structure
Presentations Linked Lists Data Structure
Anil Yadav
 
Lec-12, 13 Quees First In First Out (FIFO)
Lec-12, 13 Quees First In First Out (FIFO)
Anil Yadav
 
Lec-12, 13 Quee s Applications of Queues
Lec-12, 13 Quee s Applications of Queues
Anil Yadav
 
Lec-12, 13 Quees Array Implementation IN
Lec-12, 13 Quees Array Implementation IN
Anil Yadav
 
Lec-12, 13 Quees In Queue IntQueue(int s)
Lec-12, 13 Quees In Queue IntQueue(int s)
Anil Yadav
 
Lec-12, 13 Quees A class for Dynamic Queue implementation
Lec-12, 13 Quees A class for Dynamic Queue implementation
Anil Yadav
 
Function enqueue inserts the value in num
Function enqueue inserts the value in num
Anil Yadav
 
Lec-12, 13 Quees -How to determine empty and full Queues?
Lec-12, 13 Quees -How to determine empty and full Queues?
Anil Yadav
 
Unit2-BIS Business Information system Data
Unit2-BIS Business Information system Data
Anil Yadav
 
Lec-12, 13 Queues - IntQueue IntQueue(int s) //constructor
Lec-12, 13 Queues - IntQueue IntQueue(int s) //constructor
Anil Yadav
 
Lec-12, 13 Quees Another implementation of Queues using Arrays
Lec-12, 13 Quees Another implementation of Queues using Arrays
Anil Yadav
 
Lec-12, 13 Quees - Circular Queues and Implementation with Array
Lec-12, 13 Quees - Circular Queues and Implementation with Array
Anil Yadav
 
Lec-32 Recursion - Divide and Conquer in Queue
Lec-32 Recursion - Divide and Conquer in Queue
Anil Yadav
 
Lec-32 Recursion -Recursion in Computer Science
Lec-32 Recursion -Recursion in Computer Science
Anil Yadav
 
Link List REPRESENTATION OF DOUBLY LINKED LIST
Link List REPRESENTATION OF DOUBLY LINKED LIST
Anil Yadav
 
ALGORITHM FOR PUSHING AN ELEMENT TO A QUEUE
ALGORITHM FOR PUSHING AN ELEMENT TO A QUEUE
Anil Yadav
 
Link List STACK and Queue USING LINKED LIST
Link List STACK and Queue USING LINKED LIST
Anil Yadav
 
Link List Programming Linked List in Cpp
Link List Programming Linked List in Cpp
Anil Yadav
 
Link List & ALGORITHM FOR DELETING A NODE
Link List & ALGORITHM FOR DELETING A NODE
Anil Yadav
 
Link List ALGORITHM FOR INSERTING A NODE
Link List ALGORITHM FOR INSERTING A NODE
Anil Yadav
 
Presentations Linked Lists Data Structure
Presentations Linked Lists Data Structure
Anil Yadav
 
Lec-12, 13 Quees First In First Out (FIFO)
Lec-12, 13 Quees First In First Out (FIFO)
Anil Yadav
 
Lec-12, 13 Quee s Applications of Queues
Lec-12, 13 Quee s Applications of Queues
Anil Yadav
 
Lec-12, 13 Quees Array Implementation IN
Lec-12, 13 Quees Array Implementation IN
Anil Yadav
 
Lec-12, 13 Quees In Queue IntQueue(int s)
Lec-12, 13 Quees In Queue IntQueue(int s)
Anil Yadav
 
Lec-12, 13 Quees A class for Dynamic Queue implementation
Lec-12, 13 Quees A class for Dynamic Queue implementation
Anil Yadav
 
Function enqueue inserts the value in num
Function enqueue inserts the value in num
Anil Yadav
 
Lec-12, 13 Quees -How to determine empty and full Queues?
Lec-12, 13 Quees -How to determine empty and full Queues?
Anil Yadav
 
Unit2-BIS Business Information system Data
Unit2-BIS Business Information system Data
Anil Yadav
 
Lec-12, 13 Queues - IntQueue IntQueue(int s) //constructor
Lec-12, 13 Queues - IntQueue IntQueue(int s) //constructor
Anil Yadav
 
Lec-12, 13 Quees Another implementation of Queues using Arrays
Lec-12, 13 Quees Another implementation of Queues using Arrays
Anil Yadav
 
Lec-12, 13 Quees - Circular Queues and Implementation with Array
Lec-12, 13 Quees - Circular Queues and Implementation with Array
Anil Yadav
 
Lec-32 Recursion - Divide and Conquer in Queue
Lec-32 Recursion - Divide and Conquer in Queue
Anil Yadav
 
Lec-32 Recursion -Recursion in Computer Science
Lec-32 Recursion -Recursion in Computer Science
Anil Yadav
 
Ad

Recently uploaded (20)

Basic English for Communication - Dr Hj Euis Eti Rohaeti Mpd
Basic English for Communication - Dr Hj Euis Eti Rohaeti Mpd
Restu Bias Primandhika
 
Paper 109 | Archetypal Journeys in ‘Interstellar’: Exploring Universal Themes...
Paper 109 | Archetypal Journeys in ‘Interstellar’: Exploring Universal Themes...
Rajdeep Bavaliya
 
Unit 3 Poster Sketches with annotations.pptx
Unit 3 Poster Sketches with annotations.pptx
bobby205207
 
SPENT QUIZ NQL JR FEST 5.0 BY SOURAV.pptx
SPENT QUIZ NQL JR FEST 5.0 BY SOURAV.pptx
Sourav Kr Podder
 
Introduction to Generative AI and Copilot.pdf
Introduction to Generative AI and Copilot.pdf
TechSoup
 
What is FIle and explanation of text files.pptx
What is FIle and explanation of text files.pptx
Ramakrishna Reddy Bijjam
 
Capitol Doctoral Presentation -June 2025.pptx
Capitol Doctoral Presentation -June 2025.pptx
CapitolTechU
 
Webcrawler_Mule_AIChain_MuleSoft_Meetup_Hyderabad
Webcrawler_Mule_AIChain_MuleSoft_Meetup_Hyderabad
Veera Pallapu
 
THERAPEUTIC COMMUNICATION included definition, characteristics, nurse patient...
THERAPEUTIC COMMUNICATION included definition, characteristics, nurse patient...
parmarjuli1412
 
Overview of Employee in Odoo 18 - Odoo Slides
Overview of Employee in Odoo 18 - Odoo Slides
Celine George
 
How to Configure Vendor Management in Lunch App of Odoo 18
How to Configure Vendor Management in Lunch App of Odoo 18
Celine George
 
IDF 30min presentation - December 2, 2024.pptx
IDF 30min presentation - December 2, 2024.pptx
ArneeAgligar
 
ABCs of Bookkeeping for Nonprofits TechSoup.pdf
ABCs of Bookkeeping for Nonprofits TechSoup.pdf
TechSoup
 
ROLE PLAY: FIRST AID -CPR & RECOVERY POSITION.pptx
ROLE PLAY: FIRST AID -CPR & RECOVERY POSITION.pptx
Belicia R.S
 
MATERI PPT TOPIK 4 LANDASAN FILOSOFIS PENDIDIKAN
MATERI PPT TOPIK 4 LANDASAN FILOSOFIS PENDIDIKAN
aditya23173
 
Overview of Off Boarding in Odoo 18 Employees
Overview of Off Boarding in Odoo 18 Employees
Celine George
 
What are the benefits that dance brings?
What are the benefits that dance brings?
memi27
 
Paper 108 | Thoreau’s Influence on Gandhi: The Evolution of Civil Disobedience
Paper 108 | Thoreau’s Influence on Gandhi: The Evolution of Civil Disobedience
Rajdeep Bavaliya
 
Black and White Illustrative Group Project Presentation.pdf (1).pdf
Black and White Illustrative Group Project Presentation.pdf (1).pdf
AnnasofiaUrsini
 
Energy Balances Of Oecd Countries 2011 Iea Statistics 1st Edition Oecd
Energy Balances Of Oecd Countries 2011 Iea Statistics 1st Edition Oecd
razelitouali
 
Basic English for Communication - Dr Hj Euis Eti Rohaeti Mpd
Basic English for Communication - Dr Hj Euis Eti Rohaeti Mpd
Restu Bias Primandhika
 
Paper 109 | Archetypal Journeys in ‘Interstellar’: Exploring Universal Themes...
Paper 109 | Archetypal Journeys in ‘Interstellar’: Exploring Universal Themes...
Rajdeep Bavaliya
 
Unit 3 Poster Sketches with annotations.pptx
Unit 3 Poster Sketches with annotations.pptx
bobby205207
 
SPENT QUIZ NQL JR FEST 5.0 BY SOURAV.pptx
SPENT QUIZ NQL JR FEST 5.0 BY SOURAV.pptx
Sourav Kr Podder
 
Introduction to Generative AI and Copilot.pdf
Introduction to Generative AI and Copilot.pdf
TechSoup
 
What is FIle and explanation of text files.pptx
What is FIle and explanation of text files.pptx
Ramakrishna Reddy Bijjam
 
Capitol Doctoral Presentation -June 2025.pptx
Capitol Doctoral Presentation -June 2025.pptx
CapitolTechU
 
Webcrawler_Mule_AIChain_MuleSoft_Meetup_Hyderabad
Webcrawler_Mule_AIChain_MuleSoft_Meetup_Hyderabad
Veera Pallapu
 
THERAPEUTIC COMMUNICATION included definition, characteristics, nurse patient...
THERAPEUTIC COMMUNICATION included definition, characteristics, nurse patient...
parmarjuli1412
 
Overview of Employee in Odoo 18 - Odoo Slides
Overview of Employee in Odoo 18 - Odoo Slides
Celine George
 
How to Configure Vendor Management in Lunch App of Odoo 18
How to Configure Vendor Management in Lunch App of Odoo 18
Celine George
 
IDF 30min presentation - December 2, 2024.pptx
IDF 30min presentation - December 2, 2024.pptx
ArneeAgligar
 
ABCs of Bookkeeping for Nonprofits TechSoup.pdf
ABCs of Bookkeeping for Nonprofits TechSoup.pdf
TechSoup
 
ROLE PLAY: FIRST AID -CPR & RECOVERY POSITION.pptx
ROLE PLAY: FIRST AID -CPR & RECOVERY POSITION.pptx
Belicia R.S
 
MATERI PPT TOPIK 4 LANDASAN FILOSOFIS PENDIDIKAN
MATERI PPT TOPIK 4 LANDASAN FILOSOFIS PENDIDIKAN
aditya23173
 
Overview of Off Boarding in Odoo 18 Employees
Overview of Off Boarding in Odoo 18 Employees
Celine George
 
What are the benefits that dance brings?
What are the benefits that dance brings?
memi27
 
Paper 108 | Thoreau’s Influence on Gandhi: The Evolution of Civil Disobedience
Paper 108 | Thoreau’s Influence on Gandhi: The Evolution of Civil Disobedience
Rajdeep Bavaliya
 
Black and White Illustrative Group Project Presentation.pdf (1).pdf
Black and White Illustrative Group Project Presentation.pdf (1).pdf
AnnasofiaUrsini
 
Energy Balances Of Oecd Countries 2011 Iea Statistics 1st Edition Oecd
Energy Balances Of Oecd Countries 2011 Iea Statistics 1st Edition Oecd
razelitouali
 
Ad

Link List : Introduction to List and Linked Lists

  • 2. Introduction to List and Linked Lists • List is a term used to refer to a linear collection of data items. A List can be implemented either by using arrays or linked lists. • Usually, a large block of memory is occupied by an array which may not be in use and it is difficult to increase the size of an array. • Another way of storing a list is to have each element in a list contain a field called a link or pointer, which contains the address of the next element in the list. www.bcanotesnepal.com • The successive elements in the list need not occupy adjacent space in memory. This type of data structure is called a linked list. 2
  • 3. Linked List • It is the most commonly used data structure used to store similar type of data in memory. • The elements of a linked list are not stored in adjacent memory locations as in arrays. www.bcanotesnepal.com • It is a linear collection of data elements, called nodes, where the linear order is implemented by means of pointers. www.bcanotesnepal.com SPecial Thanks To: Prashant sir. 3
  • 4. Linked List 4 • Ina linear or single-linked list, a node is connected to the next node by a single link. www.bcanotesnepal.com • A node in this type of linked list contains two types of fields • data: which holds a list element • next: which stores a link (i.e. pointer) to the next node in the list. ,.. I
  • 5. Linked List • The structure defined for a single linked list is implemented as follows: struct Node{ int info; struct Node * next; 5 • The structure declared for linear linked list holds two members • An integer type variable 'data' which holds the elements and • Another type 'node', which has next, which stores the address of the next node in the list. www.bcanotesnepal.com