Do binary search in middle column . Condition to terminate the loop when the 2 desired rows are found
let i_low = 0 ; let i_high = n - 1 ; let j_mid = Math . floor ( m / 2 ) ; while ( ( i_low + 1 ) < i_high ) { let i_mid = Math . floor ( ( i_low + i_high ) / 2 ) ;