I wonder, can binary search be applied on a 2D array?
You can transform 2D array into 1D array and do the binary search here. Complexity is O(log(m * n)) for mxn array.
O(log(m * n))
mxn