You are viewing a single comment's thread. Return to all comments →
recursive python solution:
def reverse(llist): if llist == None or llist.next == None: return llist new_head = reverse(llist.next) llist.next.next = llist llist.next = None return new_head
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 →
recursive python solution: