WHY MY CODE IS NOT WORKING?

HERE IS MY CODE: FOR MERGE TWO LINKED LIST

Hey @navin_japes
There’s an error in the print function, you need to write while instead of if

No i have written while(temp != NULL) LIKE THIS ONLY AND CHECKING PLEASE TELL ANY OTHER MISTAKE

@navin_japes
void printList(Node* head)
{
Node* temp = head;
if(temp != NULL)
{
cout<data<<" ";
temp = temp->next;
}
}
here’s code of print function from your code. viz wrong.

I got it was mistkae in my code sorry for that!!!

1 Like

@navin_japes
Mark your doubt as resolved if you’re clear with it now.

I have already marked it as resolved and given feedback

1 Like