Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Circular array
Input restricted deque: insertions at one end of the list but allows
deletion at both ends of the list
Output restricted deque: allows deletion at only one end of the list
but insertions at both ends of the list
Operations
1. ENQDQR: To insert an item at the right end of the queue.
2. ENQDQL: To insert an item at left end of the queue.
3. DEQDQR: To remove item from the right queue.
4. DEQDQL: To remove item from left of the queue.
Steps:
Steps
Steps:
If (left=0 AND right=0) then
Print(Dequeue Underflow)
Else If(left=right) then
ITEM=A[left]
Left=right=0
Else
ITEM=A[left]
Left=(left)%size+1
EndIf
EndIf