You are viewing a single comment's thread. Return to all comments →
Python Recursion:
def SortedInsert(head, data): node = Node(data,None,None) if (head == None): return node elif (data < head.data): node.next = head head.prev = node return node else: node = SortedInsert(head.next, data) head.next = node node.prev = head 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 →
Python Recursion: