This is my code, but I am getting output as 1 .Why?
Aggressive cows doubt
hello @ayushtiwari12 i have corrected the code and now it is producing the correct answer .
the only mistake was that you were not sorting the array before applying the binary search .
Happy Learning !!
Thankyou, Now I got it.