How to delete a entire linked list?
Submitted by: AdministratorYou 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.
Submitted by: Administrator
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.
Submitted by: Administrator
Read Online Programming Concepts Job Interview Questions And Answers
Top Programming Concepts Questions
☺ | Explain how Search engines work? |
☺ | Explain what is port? what is HTTP port, FTP port, Telnet port and others? |
☺ | What is the client business process in electronic industry (in mySAP CRM)? |
☺ | Explain how to get 1,4,7,10.....rows from a table? |
☺ | Write an O(log2(N)) algorithm to find X^N? |
Top Coding/Programming Categories
☺ | Python Interview Questions. |
☺ | OOP Interview Questions. |
☺ | Software engineering Interview Questions. |
☺ | PHP Interview Questions. |
☺ | VBA (Visual Basic for Applications) Interview Questions. |