Given an array of size n that holds ones and zeros I need to find an index of a
1 cell that has
0 to his right (in then next cell) there could be more than one pair in a given array, any one of them is fine. The array is not sorted, but we do know that the first element is
1 and the last element is
The search should be in $O(\log n)$ time. I'm thinking that a binary search variation is the answer but I'm not sure how.