First test case fail?

can you find my mistake where I did?

@S18LP0050
hello shivam,
if idx==0
then also u need to check whether arr[idx]==key or not , if it is equal ,then return 0 otherwise return -1.

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.