Follow

Translate

Thursday, March 17, 2016

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



1.    [Avail Space?]   If AVAIL = NULL, then Write
                                     
                                    OVERFLOW AND Exit


2.   [Remove first node from AVAIL list]
             
                 Set NEW : = AVAIL and AVAIL : = LINK[AVAIL].

3.  Set INFO[NEW] : = ITEM      [Copies ITEM into new node]

4.  Set LINK[NEW] : = TOP    [New node points to the original top node in the stack]

5.  Set TOP = NEW    [reset TOP to point to the new node at the top of the stack]

6. 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