Same data type doesn’t mean it’s same node. Two intersection linked list are formed when you will 3->next equal to that node which has data 4 in it or vice versa. But as in question you can see you have to form 2 different linked list and then you have to find that node of same value not address. So logic is correct no issues in that.
Test cases aren’t designed for this test case that’s why all of them have been passed. if have any other doubts feel free to ask
You can also refer to my code will help you in understanding it better, as it was submitted on leetcode so it will help you too.
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.