You are viewing a single comment's thread. Return to all comments →
Python
def Reverse(head): prev = None while head: prev = Node(head.data, prev) head = head.next return prev
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 →
Python