You are viewing a single comment's thread. Return to all comments →
my code in go
func reverse(llist *DoublyLinkedListNode) *DoublyLinkedListNode { var last *DoublyLinkedListNode for llist != nil { next := llist.next dumb := llist.prev llist.prev = llist.next llist.next = dumb last = llist llist = next } return last }
Seems like cookies are disabled on this browser, please enable them to open this website
Reverse a doubly linked list
You are viewing a single comment's thread. Return to all comments →
my code in go