Interview Questions Answers.ORG
Interviewer And Interviewee Guide
Data Structure Linked list Interview Question:
Explain Java code for recursive solution's base case?
Submitted by: Muhammad/* 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
}
Submitted by: Muhammad
*/
if(currentNode.next == NULL)
{
//set HEAD to TAIL since we are reversing list
head = currentNode;
return; //since this is the base case
}
Submitted by: Muhammad
Copyright 2007-2024 by Interview Questions Answers .ORG All Rights Reserved.
https://InterviewQuestionsAnswers.ORG.
https://InterviewQuestionsAnswers.ORG.