1 test case is failing and 1 is giving tle

Please have a look at my code as 2 test cases are not getting passed.

hello @kodivine0
image
add these two line in ur code.
reason if we have already found one then there is no need to search for another path

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.