Function to find a row in the given matrix using binary search
function binaryCheck ( ar , arr ) { var l = 0 , r = m - 1 ; while ( l <= r ) { var mid = parseInt ( ( l + r ) / 2 ) ; var temp = compareRow ( ar [ mid ] , arr ) ;