You are viewing a single comment's thread. Return to all comments →
C#
static DoublyLinkedListNode sortedInsert(DoublyLinkedListNode head, int data) { var node = new DoublyLinkedListNode(42); node.next = head; head.prev = node; head = node; while (node.next != null && node.next.data < data) { node.data = node.next.data; node = node.next; } node.data = data; return head; }
Seems like cookies are disabled on this browser, please enable them to open this website
Inserting a Node Into a Sorted Doubly Linked List
You are viewing a single comment's thread. Return to all comments →
C#