Concatenating Two Lists
Procedure to concatenate two linked lists.
Procedure :
void concatenate(struct node *first, *second) (
// Traversing to the last node of first list
while (first -> next != NULL) {
first = first -> next;
}
// Setting the next as first node of second list
first -> next = second;
}Last updated