write algorithm for delete an element from a linked list
Answers
Answered by
0
Answer:
Algorithm
Step 1: IF HEAD = NULL.
Step 2: SET PTR = HEAD.
Step 3: Repeat Steps 4 and 5 while PTR -> NEXT!= NULL.
Step 4: SET PREPTR = PTR.
Step 5: SET PTR = PTR -> NEXT.
Step 6: SET PREPTR -> NEXT = NULL.
Step 7: FREE PTR.
Step 8: EXIT.
Similar questions