SlideShare a Scribd company logo
1 of 14
DATA STRUCTURES
shahab mohamad
1
Aims:
1. We want what is the data structures.
2. We want what is the stack.
3. What is the queue and type of queue.
2
Topic :
1. Introduction.
2. Stack Data Structure.
3. Queue Data Structure.
4. Circular Queue Data Structure.
3
1. Introduction
Is a particular way of storing and organizing data in a computer so
that it can be used efficiently.
 There are two major categories:
• Static Structures
• Dynamic Structures
• Each has its own set of advantages and disadvantages.
4
Static Data Structures vs. Dynamic Data Structures
• Static Data structure:
–Is given a fixed area of memory which it can operate within.
 It is not possible to expand this fixed size in the run time. So that,
locations of each element is fixed and known by the program.
• Dynamic data structure :
 Has an area where it can operate. However, this size of the area is
flexible, not fixed as it was with static data structures.
 It is possible to expand or contract the area as required, by adding
or removing elements from data structure.
 Example: a static array and a dynamic linked list. 5
2. Stack Data Structure
Stack: A data structure in which the elements are added and
removed from one end only; a Last In First Out (LIFO) data
structure.
6
push
pop
A last in, first out (LIFO) abstract data type and data
structure.
Push: the push operation adds a new item to the top of the stack
insert number 5
insert number 6
7
5
6
5
7
6
5
Insert number 7
8
7
6
5
Insert number 8
7
6
5
8
Coutnumber8andremove
6
5
Coutnumber7andremove
5
Coutnumber6
andremove
Coutnumber5
andremove
Pop : The pop operation removes an item from the top
of the stack.
3. Queue Data Structure
A first in, first out (FIFO) abstract data type and data
structure.
Enqueue : We call the insert operation on a queue EnQueue.
Dequeue: And the delete operation DeQueue.
9
Enqueue
Dequeue
Enqueue and dequeue :
10
5
dequeue
6
5
dequeue
dequeue
enqueue
6
enqueue
4. Circular Queue Data Structure
“first in first out”.
– Insertion can be made only at the end (tail).
– Deletion can be made only at the front (head).
11
Example
12
DCBA
FDCBA
References
1. DATA STRUCTURES USING C++
SECOND EDITION : D.S. MALIK
2.‫البيانات‬ ‫هياكل‬ ‫مفصل‬ ‫الشرح‬
‫الكاتب‬:‫عبدالقادر‬ ‫داود‬ ‫ناصيف‬ ‫خالد‬.
3. Programming with 469 solved problems
Dr . Nassir H. salman
13
Questions?
Your time to ask questions..
14

More Related Content

What's hot (20)

DATA STRUCTURE IN C LANGUAGE
DATA STRUCTURE IN C LANGUAGEDATA STRUCTURE IN C LANGUAGE
DATA STRUCTURE IN C LANGUAGE
 
Ds
DsDs
Ds
 
Sorting
SortingSorting
Sorting
 
Linked list
Linked listLinked list
Linked list
 
Singly Linked List
Singly Linked ListSingly Linked List
Singly Linked List
 
Ds 3
Ds 3Ds 3
Ds 3
 
Ds 5
Ds 5Ds 5
Ds 5
 
Data structure and its types
Data structure and its typesData structure and its types
Data structure and its types
 
Implementation of queue using singly and doubly linked list.
Implementation of queue using singly and doubly linked list.Implementation of queue using singly and doubly linked list.
Implementation of queue using singly and doubly linked list.
 
Data Structures 01
Data Structures 01Data Structures 01
Data Structures 01
 
Queue ppt
Queue pptQueue ppt
Queue ppt
 
basics of queues
basics of queuesbasics of queues
basics of queues
 
Types Of Data Structure
Types Of Data StructureTypes Of Data Structure
Types Of Data Structure
 
Introductiont To Aray,Tree,Stack, Queue
Introductiont To Aray,Tree,Stack, QueueIntroductiont To Aray,Tree,Stack, Queue
Introductiont To Aray,Tree,Stack, Queue
 
Data structure and its types.
Data structure and its types.Data structure and its types.
Data structure and its types.
 
Queues
QueuesQueues
Queues
 
Data Structure Basics
Data Structure BasicsData Structure Basics
Data Structure Basics
 
UNIT II LINEAR DATA STRUCTURES – STACKS, QUEUES
UNIT II 	LINEAR DATA STRUCTURES – STACKS, QUEUES	UNIT II 	LINEAR DATA STRUCTURES – STACKS, QUEUES
UNIT II LINEAR DATA STRUCTURES – STACKS, QUEUES
 
Ds 7
Ds 7Ds 7
Ds 7
 
Data structure
Data structureData structure
Data structure
 

Similar to Data strucer

Stacks
StacksStacks
StacksAcad
 
Data Structure & Algorithm.pptx
Data Structure & Algorithm.pptxData Structure & Algorithm.pptx
Data Structure & Algorithm.pptxMumtaz
 
DS-UNIT 1 FINAL (2).pptx
DS-UNIT 1 FINAL (2).pptxDS-UNIT 1 FINAL (2).pptx
DS-UNIT 1 FINAL (2).pptxprakashvs7
 
Data Structures_Introduction
Data Structures_IntroductionData Structures_Introduction
Data Structures_IntroductionThenmozhiK5
 
Data structures Lecture no. 2
Data structures Lecture no. 2Data structures Lecture no. 2
Data structures Lecture no. 2AzharIqbal710687
 
STACKS AND QUEUES.pptx
STACKS AND QUEUES.pptxSTACKS AND QUEUES.pptx
STACKS AND QUEUES.pptxLECO9
 
STACKS AND QUEUES.pptx
STACKS AND QUEUES.pptxSTACKS AND QUEUES.pptx
STACKS AND QUEUES.pptxSKUP1
 
MD AZAM CA-1-1.pptx
MD AZAM CA-1-1.pptxMD AZAM CA-1-1.pptx
MD AZAM CA-1-1.pptxMyMovies15
 
II B.Sc IT DATA STRUCTURES.pptx
II B.Sc IT DATA STRUCTURES.pptxII B.Sc IT DATA STRUCTURES.pptx
II B.Sc IT DATA STRUCTURES.pptxsabithabanu83
 
01-Introduction of DSA-1.pptx
01-Introduction of DSA-1.pptx01-Introduction of DSA-1.pptx
01-Introduction of DSA-1.pptxDwijBaxi
 
stacks and queues for public
stacks and queues for publicstacks and queues for public
stacks and queues for publiciqbalphy1
 
QUEUE in data-structure (classification, working procedure, Applications)
QUEUE in data-structure (classification, working procedure, Applications)QUEUE in data-structure (classification, working procedure, Applications)
QUEUE in data-structure (classification, working procedure, Applications)Mehedi Hasan
 
1. Data structures introduction
1. Data structures introduction1. Data structures introduction
1. Data structures introductionMandeep Singh
 
Data structure,abstraction,abstract data type,static and dynamic,time and spa...
Data structure,abstraction,abstract data type,static and dynamic,time and spa...Data structure,abstraction,abstract data type,static and dynamic,time and spa...
Data structure,abstraction,abstract data type,static and dynamic,time and spa...Hassan Ahmed
 
b,Sc it data structure.pptx
b,Sc it data structure.pptxb,Sc it data structure.pptx
b,Sc it data structure.pptxclassall
 

Similar to Data strucer (20)

stack.pptx
stack.pptxstack.pptx
stack.pptx
 
Data Structures
Data StructuresData Structures
Data Structures
 
STACK.pptx
STACK.pptxSTACK.pptx
STACK.pptx
 
Stacks
StacksStacks
Stacks
 
Data Structure & Algorithm.pptx
Data Structure & Algorithm.pptxData Structure & Algorithm.pptx
Data Structure & Algorithm.pptx
 
DS-UNIT 1 FINAL (2).pptx
DS-UNIT 1 FINAL (2).pptxDS-UNIT 1 FINAL (2).pptx
DS-UNIT 1 FINAL (2).pptx
 
Data Structures_Introduction
Data Structures_IntroductionData Structures_Introduction
Data Structures_Introduction
 
Data structures Lecture no. 2
Data structures Lecture no. 2Data structures Lecture no. 2
Data structures Lecture no. 2
 
STACKS AND QUEUES.pptx
STACKS AND QUEUES.pptxSTACKS AND QUEUES.pptx
STACKS AND QUEUES.pptx
 
STACKS AND QUEUES.pptx
STACKS AND QUEUES.pptxSTACKS AND QUEUES.pptx
STACKS AND QUEUES.pptx
 
MD AZAM CA-1-1.pptx
MD AZAM CA-1-1.pptxMD AZAM CA-1-1.pptx
MD AZAM CA-1-1.pptx
 
II B.Sc IT DATA STRUCTURES.pptx
II B.Sc IT DATA STRUCTURES.pptxII B.Sc IT DATA STRUCTURES.pptx
II B.Sc IT DATA STRUCTURES.pptx
 
01-Introduction of DSA-1.pptx
01-Introduction of DSA-1.pptx01-Introduction of DSA-1.pptx
01-Introduction of DSA-1.pptx
 
stacks and queues for public
stacks and queues for publicstacks and queues for public
stacks and queues for public
 
TSAT Presentation1.pptx
TSAT Presentation1.pptxTSAT Presentation1.pptx
TSAT Presentation1.pptx
 
QUEUE in data-structure (classification, working procedure, Applications)
QUEUE in data-structure (classification, working procedure, Applications)QUEUE in data-structure (classification, working procedure, Applications)
QUEUE in data-structure (classification, working procedure, Applications)
 
Stack a Data Structure
Stack a Data StructureStack a Data Structure
Stack a Data Structure
 
1. Data structures introduction
1. Data structures introduction1. Data structures introduction
1. Data structures introduction
 
Data structure,abstraction,abstract data type,static and dynamic,time and spa...
Data structure,abstraction,abstract data type,static and dynamic,time and spa...Data structure,abstraction,abstract data type,static and dynamic,time and spa...
Data structure,abstraction,abstract data type,static and dynamic,time and spa...
 
b,Sc it data structure.pptx
b,Sc it data structure.pptxb,Sc it data structure.pptx
b,Sc it data structure.pptx
 

Recently uploaded

08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAndikSusilo4
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 

Recently uploaded (20)

08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 

Data strucer

  • 2. Aims: 1. We want what is the data structures. 2. We want what is the stack. 3. What is the queue and type of queue. 2
  • 3. Topic : 1. Introduction. 2. Stack Data Structure. 3. Queue Data Structure. 4. Circular Queue Data Structure. 3
  • 4. 1. Introduction Is a particular way of storing and organizing data in a computer so that it can be used efficiently.  There are two major categories: • Static Structures • Dynamic Structures • Each has its own set of advantages and disadvantages. 4
  • 5. Static Data Structures vs. Dynamic Data Structures • Static Data structure: –Is given a fixed area of memory which it can operate within.  It is not possible to expand this fixed size in the run time. So that, locations of each element is fixed and known by the program. • Dynamic data structure :  Has an area where it can operate. However, this size of the area is flexible, not fixed as it was with static data structures.  It is possible to expand or contract the area as required, by adding or removing elements from data structure.  Example: a static array and a dynamic linked list. 5
  • 6. 2. Stack Data Structure Stack: A data structure in which the elements are added and removed from one end only; a Last In First Out (LIFO) data structure. 6 push pop
  • 7. A last in, first out (LIFO) abstract data type and data structure. Push: the push operation adds a new item to the top of the stack insert number 5 insert number 6 7 5 6 5 7 6 5 Insert number 7 8 7 6 5 Insert number 8
  • 9. 3. Queue Data Structure A first in, first out (FIFO) abstract data type and data structure. Enqueue : We call the insert operation on a queue EnQueue. Dequeue: And the delete operation DeQueue. 9 Enqueue Dequeue
  • 10. Enqueue and dequeue : 10 5 dequeue 6 5 dequeue dequeue enqueue 6 enqueue
  • 11. 4. Circular Queue Data Structure “first in first out”. – Insertion can be made only at the end (tail). – Deletion can be made only at the front (head). 11
  • 13. References 1. DATA STRUCTURES USING C++ SECOND EDITION : D.S. MALIK 2.‫البيانات‬ ‫هياكل‬ ‫مفصل‬ ‫الشرح‬ ‫الكاتب‬:‫عبدالقادر‬ ‫داود‬ ‫ناصيف‬ ‫خالد‬. 3. Programming with 469 solved problems Dr . Nassir H. salman 13
  • 14. Questions? Your time to ask questions.. 14