the following code is giving run time error
Binary search in rotated array
Your code is correct. The runtime error that you are getting is not permanent ie if you are trying after waiting some time it gives correct result. It is because of IDE and compiler only. So do not worry about this error.
i tried submitting at different times it still gives runtime error