0 votes 0 votes # plz explain??? i am not understand question?? Algorithms testbook-test-series test-series + – Hradesh patel asked Jan 22, 2017 • retagged Jun 4, 2017 by Arjun Hradesh patel 411 views answer comment Share Follow See all 7 Comments See all 7 7 Comments reply Show 4 previous comments Rahul Jain25 commented Jan 22, 2017 reply Follow Share @gabbar what if all rows have last 1 before the middle index???? @hardesh what is explanation given?? 0 votes 0 votes Hradesh patel commented Jan 22, 2017 reply Follow Share solution which is given?? 0 votes 0 votes Rahul Jain25 commented Jan 22, 2017 reply Follow Share I think that was really a bad solution. They are asking to go n times(possible in worst case) in each row which show make it n2 and not 2n. My approach is to find leftmost 1 or rightmrightmist 0 in each row that is going to take logn time. For each row do the same O(n log n) 0 votes 0 votes Please log in or register to add a comment.