You are on page 1of 1

PUSH OPERATION OF STACK Step 1: IF TOP=MAX-1 then write “STACK OVERFLOW and STOP” Step 2:READ DATA

Step 3: TOP TOP+1 Step 4: STACK[TOP] DATA Step 5: STOP POP OPERATION OF STACK Step 1: IF TOP < 0 then write “STACK UNDERLOW and STOP” Step 2: STACK[TOP] NULL Step 3: TOP TOP - 1 Step 4: STOP INSERTION OPERATION OF QUEUE Step 1: IF REAR=MAX then write “Queue is OVERFLOW & STOP” Step 2:READ DATA Step 3: IF FRONT =0 then (a)FRONT FRONT + 1 (b)REAR REAR + 1 (c) Q(REAR) DATA else REAR REAR + 1 Q(REAR) DATA Step 5: STOP

DELETE OPERATION OF QUEUE ……………………..DO IT YOUESELF