SlideShare uma empresa Scribd logo
1 de 8
DEQUE
PRESENTED BY
SOUMEEN ROUT
210301151013
B.TECH (EEE) 3RD SEM
WHAT IS DATA STRUCTURE?
A Data structure is a specialized format for organizing, processing, retrieving and storing data.
Types of Data Structure Linear data structure, non linear data structure
Linear is divided into 4 types
1. Array
2. Stack
3. Queue
4. Linked List
Non linear is divided into 2 types
1. Graphs
2. Trees
DOUBLE-ENDED QUEUE
A Deque or deck is a double-ended queue.
Allow element to be added or removed on either the ends.
TYPES OF DEQUE
Input restricted deque
Element can be inserted only at
one end
Element can be removed from
both the ends
Output restricted deque
Elements can be removed only
at one end.
Elements can be inserted from
both the ends.
OPERATIONIN DEQUE
Insert element at back.
Insert element at front.
Remove element at front.
Remove element at back.
INSERT_FRONT
insert_front() is a operation used to push an element into
the front of the deque
Algorithm Insert_front
Step 1. Start
Step 2. Check the queue is full or not as if (r == max-1) &&(f==0)
Step 3. if false update the pointer f as f = f-1
Step 4. Insert the element at pointer f as Q[f] = element
Step 5. Stop
THANK YOU

Mais conteúdo relacionado

Semelhante a deque.pptx

Datastructureanditstypes 110410094332-phpapp02
Datastructureanditstypes 110410094332-phpapp02Datastructureanditstypes 110410094332-phpapp02
Datastructureanditstypes 110410094332-phpapp02
Getachew Ganfur
 

Semelhante a deque.pptx (20)

Queues
Queues Queues
Queues
 
Queue
QueueQueue
Queue
 
Unit i(dsc++)
Unit i(dsc++)Unit i(dsc++)
Unit i(dsc++)
 
Data structure
Data structureData structure
Data structure
 
Datastructureanditstypes 110410094332-phpapp02
Datastructureanditstypes 110410094332-phpapp02Datastructureanditstypes 110410094332-phpapp02
Datastructureanditstypes 110410094332-phpapp02
 
Queue - Data Structure - Notes
Queue - Data Structure - NotesQueue - Data Structure - Notes
Queue - Data Structure - Notes
 
Updated Lab3.docx
Updated Lab3.docxUpdated Lab3.docx
Updated Lab3.docx
 
Slide 1.-datastructure
Slide 1.-datastructureSlide 1.-datastructure
Slide 1.-datastructure
 
Bca ii dfs u-2 linklist,stack,queue
Bca ii  dfs u-2 linklist,stack,queueBca ii  dfs u-2 linklist,stack,queue
Bca ii dfs u-2 linklist,stack,queue
 
Data Structures 2
Data Structures 2Data Structures 2
Data Structures 2
 
queue_final.pptx
queue_final.pptxqueue_final.pptx
queue_final.pptx
 
DS Module 1.pptx
DS Module 1.pptxDS Module 1.pptx
DS Module 1.pptx
 
DS Module1 (1).pptx
DS Module1 (1).pptxDS Module1 (1).pptx
DS Module1 (1).pptx
 
Queues.ppt
Queues.pptQueues.ppt
Queues.ppt
 
Data Structure
Data Structure Data Structure
Data Structure
 
DS Module 1.pptx
DS Module 1.pptxDS Module 1.pptx
DS Module 1.pptx
 
Data structures
Data structuresData structures
Data structures
 
Bsc cs ii dfs u-2 linklist,stack,queue
Bsc cs ii  dfs u-2 linklist,stack,queueBsc cs ii  dfs u-2 linklist,stack,queue
Bsc cs ii dfs u-2 linklist,stack,queue
 
queue & its applications
queue & its applicationsqueue & its applications
queue & its applications
 
Queue
QueueQueue
Queue
 

Último

Último (20)

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
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
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)
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptx
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
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
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
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Ă...
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 

deque.pptx

  • 2. WHAT IS DATA STRUCTURE? A Data structure is a specialized format for organizing, processing, retrieving and storing data. Types of Data Structure Linear data structure, non linear data structure Linear is divided into 4 types 1. Array 2. Stack 3. Queue 4. Linked List Non linear is divided into 2 types 1. Graphs 2. Trees
  • 3. DOUBLE-ENDED QUEUE A Deque or deck is a double-ended queue. Allow element to be added or removed on either the ends.
  • 4. TYPES OF DEQUE Input restricted deque Element can be inserted only at one end Element can be removed from both the ends Output restricted deque Elements can be removed only at one end. Elements can be inserted from both the ends.
  • 5. OPERATIONIN DEQUE Insert element at back. Insert element at front. Remove element at front. Remove element at back.
  • 6. INSERT_FRONT insert_front() is a operation used to push an element into the front of the deque
  • 7. Algorithm Insert_front Step 1. Start Step 2. Check the queue is full or not as if (r == max-1) &&(f==0) Step 3. if false update the pointer f as f = f-1 Step 4. Insert the element at pointer f as Q[f] = element Step 5. Stop