Code- https://ide.codingblocks.com/s/229357
it is saying not found and key exist
Why it is not showing found even if key exist
Hello @anubhavb11,
Binary search requires a sorted array.
And the array you have passed is not sorted.
Corrected Code:
Hope, this would help.
Give a like if you are satisfied.