Converging linked lists

 

Assume that we have two singly linked lists of unknown length (i.e., number of nodes in each list). The lengths of the lists can be different (e.g., one list can have 8 notes and the other 5 nodes). The two lists converge into the first node of a singly linked list. This configuration is also equivalent to the “next” of the end node of one list to be linked to some in-between node of the other list. Once the two-headed list is constructed, the location of the convergence node is assumed to be unknown. Finding the convergence node is our main goal. The head nodes of each of the two converging lists are known.

This question has been answered.

Get Answer