Not getting correct output


please help me fixing it

@shubham.mehla2000 hey shubham mehla in the binary search order is is matter so if your input array is sorted in increasing order then it will work fine but if input is given in dec order the condition will filp
you can see the modication in your code

1 Like