Queus
Queus
❑ Applications of Queue
Queue
if(isfull()) return 1
front rear
18
Types of deque
● Input-restricted deque
Deletion can be made from both ends , but Insertion can be made
at one end only.
● Output-restricted deque
Insertion can be made at both ends , but Deletion can be made
from one end only.
19
deque Operations
● pushRear() - Insert element at back
20
deque Example
Operation Deque content
pushFront(‘a’) [‘a’]
pushFront(‘b’) [‘b’ , ‘a’]
pushRear(‘c’) [‘b’ , ‘a’ , ‘c’]
21
Queue Applications: Job Scheduling