You are viewing a single comment's thread. Return to all comments →
Hey,
If we go in the else part, we should return current instead of head right?
How does returning head give us the correct solution? Can you please explain?
Seems like cookies are disabled on this browser, please enable them to open this website
Insert a Node at the Tail of a Linked List
You are viewing a single comment's thread. Return to all comments →
Hey,
If we go in the else part, we should return current instead of head right?
How does returning head give us the correct solution? Can you please explain?