Assume we have a binary array A of size n and all 1 are in the middle and all 0 are on both sides like 00011000.
We don't know the number of 1's and the array could be not symmetric, and we are guaranteed that at least 1 position i that A[i]=1 and at least one position j:j<i, A[j]=0 and at least one position k:k>i, A[k]=0.
What could be the efficient algorithm, perhaps with complexity like poly(log n), to find the separation index between 0 and 1, i.e., the index i such that (A[i]=1,A[i-1]=0) or (A[i]=1, A[i+1]=0)? Do we have a name for this problem ?