Follow

Translate

Thursday, March 17, 2016

POP_LINKSTACK(INFO, LINK, TOP, AVAIL, ITEM)



1.    [Stack has an item to be removed?]   If TOP = NULL, then Write:
                                     
                                    UNDERFLOW AND Exit

2.  Set ITEM : = INFO[TOP]    [Copies the top element of STACK  ITEM into ITEM]

3.  Set TEMP : = TOP and TOP = LINK[TOP]    [Remember the old value of the TOP pointer in TEMP and reset TOP to point to the next element in the stack]

4.   [ Return Remove  node from AVAIL list]
             
                 Set LINK[TEMP]   = AVAIL and AVAIL  = TEMP.
5. Exit.

If You want to learn about the technology, computer science & engineering, web programming, freelancing, earning please click here :CSE SOLVE

0 comments:

Post a Comment