Publicité

deque.pptx

24 Mar 2023
Publicité

Contenu connexe

Publicité

deque.pptx

  1. DEQUE PRESENTED BY SOUMEEN ROUT 210301151013 B.TECH (EEE) 3RD SEM
  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
  8. THANK YOU
Publicité