You are viewing a single comment's thread. Return to all comments →
can you please explain me the else part or test case 7 ???
I wrote with diffferent approach and it is bigger code, this is my else part----->
else:
current=last=head while(current.data<data): if(current.next==None): current.next=DoublyLinkedListNode(data) current.next.next=None return head last=current current=current.next last.next=DoublyLinkedListNode(data) last.next.next=current 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 →
can you please explain me the else part or test case 7 ???
I wrote with diffferent approach and it is bigger code, this is my else part----->
else: