Can you please give what i have to give in input and expect in output
Give some testcase
hello @Saumya123456789 you can try for the test case :
input:
682 648 915 815 283 935 492 556 747 659 789 276 835 784 320 229 559 195 127 37 360 174 689 732 707 253 3 -1
138 938 187 501 881 22 873 988 172 49 606 4 784
ouput:
L1 - 682 648 915 815 283 935 492 556 747 659 789 276 835 784 320 229 559 195 127 37 360 174 689 732 707 253 3
L2 - 138 938 187 501 881 22 873 988 172 49 606 4 784 320 229 559 195 127 37 360 174 689 732 707 253 3
Intersection at node with data = 784
try for this output
i hope i have cleared your query
please mark this as resolved if you dont have any other doubt .
Happy Learning !!
testcases
input
1 2 3 4 5 -1
0 2 3 4 5 -1
output should be 2
for input
1 2 3 4 5 -1
6 7 8 9 0 3 4 5 -1
output should be 3
Reference Code
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.