1.

Write the steps for deleting an element from a queue

Answer»

Deletion operation It is. the process of deleting(removing) a data item. from the queue from the front. If the queue is empty ‘ v ‘.and we try to delete an item from the queue makes 1 the queue under-row. Algorithm is given below

Step 1: If front = Null then print “UNDERFLOW: and return 

Step 2: Set item = Queue [front] 

Step 3: If front = Null and rear = Null Else if front N then set front = 1 Else Set front = front + 1 End if 

Step 4: stop



Discussion

No Comment Found