We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
In while loop inside else , when temp is pointing to last node the while loop will terminate (as temp->next == NULL will be false) thus you have to write additional code for the last node below while loop.
Cookie support is required to access HackerRank
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 →
In while loop inside else , when temp is pointing to last node the while loop will terminate (as temp->next == NULL will be false) thus you have to write additional code for the last node below while loop.