educative.io

Is there a difference between using head directly vs. using current = head?

I implemented it by using the input ‘head’ directly and it still seems to work the same, but could there be any difference vs. storing head to a separate ‘current’ variable and using ‘current’ to reverse the linked list?

In this case, it will work fine. We primarily store the head in a separate variable to retain the actual head, which is a requirement for specific problems.