Answers

Question and Answer:

  Home  Linked list

⟩ Explain Java code for recursive solution's base case?

/* if we are at the TAIL node:

*/

if(currentNode.next == NULL)

{

//set HEAD to TAIL since we are reversing list

head = currentNode;

return; //since this is the base case

}

 128 views

More Questions for you: