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
4. Linked List
Non linear is divided into 2 types
TYPES OF DEQUE
Input restricted deque
Element can be inserted only at
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.
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