Testcase 1 showing time error :

code:

hey @myself.yash.srivastav, you are missing the case when there is no intersection point, you have to return -1 in that case.