Write an algorithm that should concatenate two link lists into a single link list.
Answers
Answered by
1
Answer:
Algorithm for concatenation:-
1 . If the first linked list is empty then return head2.
2 . If the second linked list is empty then return head1
3 . Store the address of the starting node of the first linked. list in a pointer variable, say p.
4 . Store the address of the first node of the second linked
hope it helps you plz mark it as brainlist ✌️
Similar questions