Thank you.
Can you tell me how to properly sort what is found in this algorithm:
Code:
if(temp->next_ != NULL){
temp = temp->next_;
temp->prev_ = curr->prev_;
temp = temp->prev_;
temp->next_ = curr->next_;
}
It is where the logical error is and I can't seem to wrap my mind around sorting it so the thing that was found (located in temp) can be found at the beginning of the linked list.
head refers to the front of the linked list
tail refers to the end of the linked list
curr and temp are pointers to the linked list
next is a pointer to the next point in the linked list and prev is a pointer to the previous node in the linked list...