# LeetCode
## problem4
---
There is a very obscure condition here:
* i + j == m - i + n - j or i + j = m - i + n - j + 1,the former is taken when the sum of m and n is even,otherwise the latter.
* i is the index of the first array who cut the first array into two subarrays,and i is the frist index of the right subarray.
* j is the index of the second array who cut the second array into two subarrys,and i is the frist index of the right subarray.
* m and n means length of the two arrays,and m is the greater one whose first right index is i.
And the second condition is that :
* If the a[i] >= b [j-1] && b[j] >= a[i-1],the i and j are the final result that we want.
* The a[] and b[] are the two arrays.
Then we can apply these two conditions into our binary search.
The time complexity of the solution is O(min(m,n)).