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.
What is the reason for "head = node" in your else if condtion? I am confused because isn't that basically inserting "node" and then having node->next equal to node too?
Inserting a Node Into a Sorted Doubly Linked List
You are viewing a single comment's thread. Return to all comments →
What is the reason for "head = node" in your else if condtion? I am confused because isn't that basically inserting "node" and then having node->next equal to node too?