comefrom: <awangdev>Search a 2D Matrix_1.java
code: public boolean searchMatrix(int[][] matrix, int target) {
          if (matrix == null || matrix.length == 0 || matrix[0].length == 0) {
              return false;
          }
          int row = matrix.length;
          int col = matrix[0].length;
          int start = 0;
          int end = row * col - 1;
          int mid;
  
          while (start + 1 < end) {
              mid = start + (end - start)/2;
              int num = matrix[mid/col][mid%col];
              if (target == num) {
                  return true;
              } else if (num < target) {
                  start = mid;
              } else {
                  end = mid;
              }
          }
  
          return (matrix[start/col][start%col] == target || matrix[end/col][end%col] == target);
      }
masked: public boolean var_0 ( int [ ] [ ] var_1 , int var_2 ) {
    if ( var_1 == null || var_1 . length == 0 || var_1 [ 0 ] . length == 0 ) {
      return false ;
    }
    int var_3 = var_1 . length ;
    int var_4 = var_1 [ 0 ] . length ;
    int var_5 = 0 ;
    int var_6 = var_3 * var_4 - 1 ;
    int var_7 ;
    while ( var_5 + 1 < var_6 ) {
      var_7 = var_5 + ( var_6 - var_5 ) / 2 ;
      int var_8 = var_1 [ var_7 / var_4 ] [ var_7 % var_4 ] ;
      if ( var_2 == var_8 ) {
        return true ;
      }
      else if ( var_8 < var_2 ) {
        var_5 = var_7 ;
      }
      else {
        var_6 = var_7 ;
      }
    }
    return ( var_1 [ var_5 / var_4 ] [ var_5 % var_4 ] == var_2 || var_1 [ var_6 / var_4 ] [ var_6 % var_4 ] == var_2 ) ;
  }
  