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
Political Science,
1 month ago
Social Sciences,
1 month ago
Geography,
3 months ago
Science,
3 months ago
Math,
10 months ago
Science,
10 months ago
Biology,
10 months ago