cleonjoys
BAN USER
Comments (4)
Reputation 0
Page:
1
Comment hidden because of low score. Click to expand.
Comment hidden because of low score. Click to expand.
Comment hidden because of low score. Click to expand.
Comment hidden because of low score. Click to expand.
0
of 0 vote
The max value which can be in any row is no. of columns, with this in mind we need to start column based search starting from left most column i.e., with column id 0, this search cannot be binary search or any other optimized as each row value is not incremental(or we don't know) whenever we find first 1 in our column based search we found our row, the value will be =
no. of columns - found_col_id or max_column_id - found_col_id + 1
Page:
1
CareerCup is the world's biggest and best source for software engineering interview preparation. See all our resources.
Please check the following code.
- cleonjoys January 23, 2017