Question: How do you write a clear method for linked list, that is to clear the entire elements (nodes)? Not just to change the pointer of
How do you write a clear method for linked list, that is to clear the entire elements (nodes)?
Not just to change the pointer of the first node to null, but also have to clear the memory.
Thank you for the help. This question is based on JAVA.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
