Follow

Translate

Wednesday, March 16, 2016

DELLSTH(INFO, LINK START, AVAIL)


1.         [List empty?] If LINK[START] = NULL, then: Write: UNDERFLOW,a nd Exit.

2.  Set PTR:  = LINK[START] and SAVE : = START. [Initializes  pointer.]

3.   Repeat while LINK[PTR] != START:   [Traverse list seeking last node. ]

     Set SAVE : = PTR and PTR : = LINK[PTR].  [Updates SAVE and PTR]

[End of Loop]

4.  Set LINK[SAVE] : = LINK[PTR].    [removes last node.]

5.  Set LINK[PTR] : = AVAIL and AVAIL : = PTR.  [Returns node to AVAIL list.]

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