All test cases not passing


you have print -1 if no intersection is detected.

1 Like

@mayankA47 I have added -1 but still two test cases are not passing

try the code I have provided

@mayankA47 thanks it worked actually i have not added p and q as nullptr in if condition