Is there an assumption that the inserted element is always larger than the head?
I do not believe a value is stored at the head. Here, the first node with data in the list is head->next.
@toutou: No, but there's a comment that remarks "assume case of inserting before head of list is handled here (to keep slide simple)".
Is there an assumption that the inserted element is always larger than the head?
I do not believe a value is stored at the head. Here, the first node with data in the list is head->next.
@toutou: No, but there's a comment that remarks "assume case of inserting before head of list is handled here (to keep slide simple)".