Binary search Python 2.7

I’m getting WA on SPOJ.
Here’s the problem: SPOJ.com - Problem BSEARCH1
Here’s the code: 0CSrEj - Online Python Interpreter & Debugging Tool - Ideone.com
(it includes optimization)

I need a test case that will help to find a mistake. I’ve tried several cases and can’t find mistakes.

See input number 2 on your link it is giving RE (list index out of range) check it out.

1 Like