: DELETE(INFO, LINK, START, AVAIL, ITEM)
This algorithm deletes from a linked list the first node N which contains the
given ITEM of information.
1. (Use Procedure 5.9 to find the location of N and its preceding node.)
Call FINDB(INFO, LINK, START, ITEM, LOC, LOCP)
2. If LOC = NULL, then: Write: ITEM not in list, and Exit.
3. [Delete node.)
If LOCP = NULL, then:
Set START := LINK[START]. [Deletes first node.)
Else:
Set LINK[LOCP) := LINK[LOC).
[End of If structure.]
4. [Return deleted node to the AVAIL list.]
Set LINK[LOC] := AVAIL and AVAIL := LOC.
5. Exit.
please help me to converting it into c++ code..
Answers
Answered by
1
Answer:
its preceding node
Explanation:
Answered by
0
i
okkkkkkkkkkkkkkkkkkkkk
Similar questions