Answers

Question and Answer:

  Home  Programming Concepts

⟩ How to delete a entire linked list?

You delete a linked list by iterating through the list and deleting the nodes one by one.

Begin at the head

Get address of first node

Get address of next node

Delete first node

Do not to access next of the current node after deleting the current node.

Move next node to first node

Repeat

If the list is empty, the head pointer will be NULL.

 213 views

More Questions for you: