SlideShare ist ein Scribd-Unternehmen logo
1 von 7
Linked Stacks and queues RamziShihadehAlqrainy
Linked list * is one of the fundamental data structures, and can be used to implement  other data structures. It consists of a sequence of nodes.                                                                                    Link                                    Data                                                                                                             NODE * Node that consists of two type: 1- Data : The data being stored in the node. 2- Link : A reference to the next or previous node, null if last node
Type of linked list 1- Singly-linked list : The simplest kind of linked list is a singly-linked list (or slist for short), which has one link per node. This link points to the next node in the list, or to a null value or empty list if it is the final node.                                                                                                    Null               Head 2- Doubly-linked list : A more sophisticated kind of linked list is a doubly-linked list or two-way linked list. Each node has two links: one points to the previous node, or points to a null value or empty list if it is the first node; and one points to the next, or points to a null value or empty list if it is the final node.
3- Circularly-linked list In a circularly-linked list, the first and final nodes are linked together. This can be done for both singly and doubly linked lists.  You begin at any node and follow the list in either direction until you return to the original node.  * One of the advantages of the Linked-List is Dynamic allocation of memory.
nodes One of the basic of Linked Structures. *The first constructor does  nothing except to set next  to NULL , The second  Constructor is used to set  the data members of a Node  To the values specified as  Parameters.
Implementation of Node
 Example

Weitere ähnliche Inhalte

Was ist angesagt?

Linked list
Linked listLinked list
Linked list
VONI
 
12. Indexing and Hashing in DBMS
12. Indexing and Hashing in DBMS12. Indexing and Hashing in DBMS
12. Indexing and Hashing in DBMS
koolkampus
 

Was ist angesagt? (20)

Doubly linked list
Doubly linked listDoubly linked list
Doubly linked list
 
Doubly linked list
Doubly linked listDoubly linked list
Doubly linked list
 
linked lists in data structures
linked lists in data structureslinked lists in data structures
linked lists in data structures
 
Singly link list
Singly link listSingly link list
Singly link list
 
linked list in Data Structure, Simple and Easy Tutorial
linked list in Data Structure, Simple and Easy Tutoriallinked list in Data Structure, Simple and Easy Tutorial
linked list in Data Structure, Simple and Easy Tutorial
 
single linked list
single linked listsingle linked list
single linked list
 
Linked list
Linked listLinked list
Linked list
 
Double Linked List (Algorithm)
Double Linked List (Algorithm)Double Linked List (Algorithm)
Double Linked List (Algorithm)
 
Linked list
Linked list Linked list
Linked list
 
Binary Search Tree in Data Structure
Binary Search Tree in Data StructureBinary Search Tree in Data Structure
Binary Search Tree in Data Structure
 
Ppt on Linked list,stack,queue
Ppt on Linked list,stack,queuePpt on Linked list,stack,queue
Ppt on Linked list,stack,queue
 
Graph data structure and algorithms
Graph data structure and algorithmsGraph data structure and algorithms
Graph data structure and algorithms
 
Linked list
Linked listLinked list
Linked list
 
Linked list
Linked listLinked list
Linked list
 
Binary search tree operations
Binary search tree operationsBinary search tree operations
Binary search tree operations
 
Data Structures - Lecture 9 [Stack & Queue using Linked List]
 Data Structures - Lecture 9 [Stack & Queue using Linked List] Data Structures - Lecture 9 [Stack & Queue using Linked List]
Data Structures - Lecture 9 [Stack & Queue using Linked List]
 
12. Indexing and Hashing in DBMS
12. Indexing and Hashing in DBMS12. Indexing and Hashing in DBMS
12. Indexing and Hashing in DBMS
 
Data Structures with C Linked List
Data Structures with C Linked ListData Structures with C Linked List
Data Structures with C Linked List
 
Linked list implementation of Queue
Linked list implementation of QueueLinked list implementation of Queue
Linked list implementation of Queue
 
stack & queue
stack & queuestack & queue
stack & queue
 

Andere mochten auch (13)

Ds lab manual by s.k.rath
Ds lab manual by s.k.rathDs lab manual by s.k.rath
Ds lab manual by s.k.rath
 
Stacks,queues,linked-list
Stacks,queues,linked-listStacks,queues,linked-list
Stacks,queues,linked-list
 
Formulacion de-qumica-inorganica-120319205240-phpapp01-131119105305-phpapp02-...
Formulacion de-qumica-inorganica-120319205240-phpapp01-131119105305-phpapp02-...Formulacion de-qumica-inorganica-120319205240-phpapp01-131119105305-phpapp02-...
Formulacion de-qumica-inorganica-120319205240-phpapp01-131119105305-phpapp02-...
 
Stacks and queue
Stacks and queueStacks and queue
Stacks and queue
 
Stacks, Queues, Deques
Stacks, Queues, DequesStacks, Queues, Deques
Stacks, Queues, Deques
 
Linked List Implementation of Deque in C
Linked List Implementation of Deque in CLinked List Implementation of Deque in C
Linked List Implementation of Deque in C
 
Data structure new lab manual
Data structure  new lab manualData structure  new lab manual
Data structure new lab manual
 
Stack using Linked List
Stack using Linked ListStack using Linked List
Stack using Linked List
 
Stacks & Queues By Ms. Niti Arora
Stacks & Queues By Ms. Niti AroraStacks & Queues By Ms. Niti Arora
Stacks & Queues By Ms. Niti Arora
 
Equipos de emergencia y salvamento
Equipos de emergencia y salvamentoEquipos de emergencia y salvamento
Equipos de emergencia y salvamento
 
Linked lists
Linked listsLinked lists
Linked lists
 
Queue Implementation Using Array & Linked List
Queue Implementation Using Array & Linked ListQueue Implementation Using Array & Linked List
Queue Implementation Using Array & Linked List
 
Estructura datos pilas y colas
Estructura datos pilas y colasEstructura datos pilas y colas
Estructura datos pilas y colas
 

Ähnlich wie Linked stacks and queues

In this lab we will write code for working with a Linked List. Node .pdf
In this lab we will write code for working with a Linked List.  Node .pdfIn this lab we will write code for working with a Linked List.  Node .pdf
In this lab we will write code for working with a Linked List. Node .pdf
fms12345
 

Ähnlich wie Linked stacks and queues (20)

Introduction to linked lists
Introduction to linked listsIntroduction to linked lists
Introduction to linked lists
 
Lecture 2b lists
Lecture 2b listsLecture 2b lists
Lecture 2b lists
 
Linked List-Types.pdf
Linked List-Types.pdfLinked List-Types.pdf
Linked List-Types.pdf
 
Data Structures and Algorithms - Lec 05.pptx
Data Structures and Algorithms - Lec 05.pptxData Structures and Algorithms - Lec 05.pptx
Data Structures and Algorithms - Lec 05.pptx
 
Linked List in Data Structure
Linked List in Data StructureLinked List in Data Structure
Linked List in Data Structure
 
Unit 3 dsa LINKED LIST
Unit 3 dsa LINKED LISTUnit 3 dsa LINKED LIST
Unit 3 dsa LINKED LIST
 
Link list assi
Link list assiLink list assi
Link list assi
 
DLL DATA STRUCT.pptx
DLL DATA STRUCT.pptxDLL DATA STRUCT.pptx
DLL DATA STRUCT.pptx
 
Linked list (introduction) 1
Linked list (introduction) 1Linked list (introduction) 1
Linked list (introduction) 1
 
CSE_D:11:_Somnath Mallick_3rd semister.pdf
CSE_D:11:_Somnath Mallick_3rd semister.pdfCSE_D:11:_Somnath Mallick_3rd semister.pdf
CSE_D:11:_Somnath Mallick_3rd semister.pdf
 
Linked list.docx
Linked list.docxLinked list.docx
Linked list.docx
 
DATA STRUCTURES AND LINKED LISTS IN C.pptx
DATA STRUCTURES AND LINKED LISTS IN C.pptxDATA STRUCTURES AND LINKED LISTS IN C.pptx
DATA STRUCTURES AND LINKED LISTS IN C.pptx
 
DATA STRUCTURES AND LINKED LISTS IN C.pptx
DATA STRUCTURES AND LINKED LISTS IN C.pptxDATA STRUCTURES AND LINKED LISTS IN C.pptx
DATA STRUCTURES AND LINKED LISTS IN C.pptx
 
Linked list
Linked listLinked list
Linked list
 
Circular linked list
Circular linked listCircular linked list
Circular linked list
 
In this lab we will write code for working with a Linked List. Node .pdf
In this lab we will write code for working with a Linked List.  Node .pdfIn this lab we will write code for working with a Linked List.  Node .pdf
In this lab we will write code for working with a Linked List. Node .pdf
 
Different types of Linked list.
Different types of Linked list.Different types of Linked list.
Different types of Linked list.
 
Linked List
Linked ListLinked List
Linked List
 
Linked list
Linked listLinked list
Linked list
 
02 linked list_20160217_jintaekseo
02 linked list_20160217_jintaekseo02 linked list_20160217_jintaekseo
02 linked list_20160217_jintaekseo
 

Mehr von Ramzi Alqrainy

Intel microprocessor history
Intel microprocessor historyIntel microprocessor history
Intel microprocessor history
Ramzi Alqrainy
 
How to prevent the cache problem in AJAX
How to prevent the cache problem in AJAXHow to prevent the cache problem in AJAX
How to prevent the cache problem in AJAX
Ramzi Alqrainy
 
Advance Data Structure
Advance Data StructureAdvance Data Structure
Advance Data Structure
Ramzi Alqrainy
 

Mehr von Ramzi Alqrainy (20)

Non English Search as a Machine Learning Problem
Non English Search as a Machine Learning Problem Non English Search as a Machine Learning Problem
Non English Search as a Machine Learning Problem
 
OpenSooq Image Recognition on AWS - AWS ML Lab
OpenSooq Image Recognition on AWS - AWS ML LabOpenSooq Image Recognition on AWS - AWS ML Lab
OpenSooq Image Recognition on AWS - AWS ML Lab
 
A Few Milliseconds in the Life of an HTTP Request - AWS Summit 2019
A Few Milliseconds in the Life of an HTTP Request - AWS Summit 2019A Few Milliseconds in the Life of an HTTP Request - AWS Summit 2019
A Few Milliseconds in the Life of an HTTP Request - AWS Summit 2019
 
Mastering Chaos - OpenSooq’s journey from Monolithic to Microservices
Mastering Chaos - OpenSooq’s journey from Monolithic to Microservices Mastering Chaos - OpenSooq’s journey from Monolithic to Microservices
Mastering Chaos - OpenSooq’s journey from Monolithic to Microservices
 
Infrastructure OpenSooq Mobile @ Scale
Infrastructure OpenSooq Mobile @ ScaleInfrastructure OpenSooq Mobile @ Scale
Infrastructure OpenSooq Mobile @ Scale
 
Choosing the Right Technologies for OpenSooq
Choosing the Right Technologies for OpenSooqChoosing the Right Technologies for OpenSooq
Choosing the Right Technologies for OpenSooq
 
Retrieving Information From Solr
Retrieving Information From SolrRetrieving Information From Solr
Retrieving Information From Solr
 
MemSQL
MemSQLMemSQL
MemSQL
 
Arabic Content with Apache Solr
Arabic Content with Apache SolrArabic Content with Apache Solr
Arabic Content with Apache Solr
 
Recommender Systems, Part 1 - Introduction to approaches and algorithms
Recommender Systems, Part 1 - Introduction to approaches and algorithmsRecommender Systems, Part 1 - Introduction to approaches and algorithms
Recommender Systems, Part 1 - Introduction to approaches and algorithms
 
Apache Solr 4 Part 1 - Introduction, Features, Recency Ranking and Popularity...
Apache Solr 4 Part 1 - Introduction, Features, Recency Ranking and Popularity...Apache Solr 4 Part 1 - Introduction, Features, Recency Ranking and Popularity...
Apache Solr 4 Part 1 - Introduction, Features, Recency Ranking and Popularity...
 
Evaluating Search Engines
Evaluating Search EnginesEvaluating Search Engines
Evaluating Search Engines
 
Starting From Zero - Winning Strategies for Zero Results Page
Starting From Zero - Winning Strategies for Zero Results PageStarting From Zero - Winning Strategies for Zero Results Page
Starting From Zero - Winning Strategies for Zero Results Page
 
Search Behavior Patterns
Search Behavior PatternsSearch Behavior Patterns
Search Behavior Patterns
 
Intel microprocessor history
Intel microprocessor historyIntel microprocessor history
Intel microprocessor history
 
How to prevent the cache problem in AJAX
How to prevent the cache problem in AJAXHow to prevent the cache problem in AJAX
How to prevent the cache problem in AJAX
 
Advance Data Structure
Advance Data StructureAdvance Data Structure
Advance Data Structure
 
Hashing
HashingHashing
Hashing
 
Markov Matrix
Markov MatrixMarkov Matrix
Markov Matrix
 
STACK
STACKSTACK
STACK
 

Kürzlich hochgeladen

Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
KarakKing
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
ZurliaSoop
 

Kürzlich hochgeladen (20)

Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptx
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 

Linked stacks and queues

  • 1. Linked Stacks and queues RamziShihadehAlqrainy
  • 2. Linked list * is one of the fundamental data structures, and can be used to implement other data structures. It consists of a sequence of nodes. Link Data NODE * Node that consists of two type: 1- Data : The data being stored in the node. 2- Link : A reference to the next or previous node, null if last node
  • 3. Type of linked list 1- Singly-linked list : The simplest kind of linked list is a singly-linked list (or slist for short), which has one link per node. This link points to the next node in the list, or to a null value or empty list if it is the final node. Null Head 2- Doubly-linked list : A more sophisticated kind of linked list is a doubly-linked list or two-way linked list. Each node has two links: one points to the previous node, or points to a null value or empty list if it is the first node; and one points to the next, or points to a null value or empty list if it is the final node.
  • 4. 3- Circularly-linked list In a circularly-linked list, the first and final nodes are linked together. This can be done for both singly and doubly linked lists. You begin at any node and follow the list in either direction until you return to the original node. * One of the advantages of the Linked-List is Dynamic allocation of memory.
  • 5. nodes One of the basic of Linked Structures. *The first constructor does nothing except to set next to NULL , The second Constructor is used to set the data members of a Node To the values specified as Parameters.