Binary search recursion doubt

i wrote code for binary search using recursion


its working fine but i doubt it can fail any test case
so plz confirm if my code is correct for all test cases?

also plz tell optimisation if any?

@taran9873 yeah your code is right.

any optimisations in this code?

@taran9873 no there is no need.