LinkedList : Insertsection of Linked List test is incorrect


#1

7 76 21 20 50 46 91 76
9 43 63 17 84 15 71 60 73 76
5 74 23 18 73 14

My code is failing the test case above, as you can see the last number in each of the top two rows are the same and they would be pointing to the first element in the last line. Thus the output should be

76 -> 74 -> 23 -> 18 -> 73 -> 14
instead of
74 -> 23 -> 18 -> 73 -> 14

Please look into this.


#2

Same thing happened for me too, the testcase is wrong and I lost point because of that

7 76 21 20 50 46 91 76
9 43 63 17 84 15 71 60 73 76
5 74 23 18 73 14

Your function returned the following :
76 -> 74 -> 23 -> 18 -> 73 -> 14
The expected returned value :
74 -> 23 -> 18 -> 73 -> 14


#3

Nevermind, found it.
The nodes should be same not just via values of those nodes but they should be exact same node in both linked list.

So the question is not to merge the nodes, but to find the point where they are already merged


#4

your observation is correct.Thanks.