You are viewing a single comment's thread. Return to all comments →
C#
public static DoublyLinkedListNode reverse(DoublyLinkedListNode llist) { DoublyLinkedListNode next; while(llist != null) { next = llist.next; llist.next = llist.prev; llist.prev = next; llist = next; } return llist; }
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 →
C#