Why test case1 is wrong?

hello @gagz23

image

this should be like ->
return index(arr,start-1,key);

rest everything is correct

what difference does it make?

in urs code u will always return -1.
but

this line will return value that is given by this function call , which may or may not be -1