You are viewing a single comment's thread. Return to all comments →
They are calling the SortedInsert method one by one.
e.g. for the input
4
2 1 4 3
the method SortedInsert will be called four times as below,
SortedInsert(head,2) // NULL <--2-->NULL SortedInsert(head,1) // NULL <--1<-->2-->NULL SortedInsert(head,4) // NULL <--1<-->2<-->4-->NULL SortedInsert(head,3) // NULL <--1<-->2<-->3<-->4-->NULL
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 →
They are calling the SortedInsert method one by one.
e.g. for the input
4
2 1 4 3
the method SortedInsert will be called four times as below,