You are viewing a single comment's thread. Return to all comments →
Why can't we do remaining.next = head instead of head.next.next = head. Shouldn't it do the same thing ?
Seems like cookies are disabled on this browser, please enable them to open this website
Reverse a linked list
You are viewing a single comment's thread. Return to all comments →
Why can't we do remaining.next = head instead of head.next.next = head. Shouldn't it do the same thing ?