finding the maximum number of 1's in a row
    A 2d matrix is given filled with 1's and 0's. It is given that all 1's in a row come before all the 0's. We have to find the maximum number of 1's in a row.

I have made the solution that we can apply binary search on every row to get the last index of last 1 in that row before 0's begin and hence the no. of 1's will be its index+1. So we can do this at every row.
So the complexity would be O(mlogn),where m is the no. of rows and n is the no. of columns.
Can there be a better solution to this?
finding the maximum number of 1's in a row
===

    A 2d matrix is given filled with 1's and 0's. It is given that all 1's in a row come before all the 0's. We have to find the maximum number of 1's in a row.

I have made the solution that we can apply binary search on every row to get the last index of last 1 in that row before 0's begin and hence the no. of 1's will be its index+1. So we can do this at every row.
So the complexity would be O(mlogn),where m is the no. of rows and n is the no. of columns.
Can there be a better solution to this?