You are viewing a single comment's thread. Return to all comments →
My python solution :
def reverse(llist): llist_2 = SinglyLinkedList() current = llist while current : node = SinglyLinkedListNode(current.data) node.next = llist_2.head llist_2.head = node current = current.next return llist_2.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 →
My python solution :