Sunday, September 15, 2013

Deque Algorithm for Curcular Queue using Array


If(Front == U)

      next = L

Else

      next = Front + 1

EndIf


Item = NULL



If(Front < L)

      print “Queue is Empty.  

      Dequeue not possible.”

Else

     Item = A[Front]

     A[Front] = NULL

    

     If(Front == Rear)

          Front = L-1

          Rear = L-1

     Else

           Front = next

     EndIf

EndIf

Return(Item)

VIEW : ENQUE ALGORITHM

No comments:

Post a Comment