Question: Assume you add this method to the class SinglyLinkedList: public void m 1 ( ) { Node tmp = head; while ( tmp ! =
Assume you add this method to the class SinglyLinkedList:
public void
Node tmp head;
while tmptail
ggetNext;
If the list has nodes, and you call this method, what will happen to the list?
Nothing
All the nodes in the list are removed except the first one.
All the nodes in the list are removed except the last one.
All the nodes in the list are removed.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
