<awangdev>Kth Smallest Element in a Sorted Matrix_1.java
private int countSmallerItem(int[][] matrix, int target) {

        int n = matrix.length;
        int count = 0;
        int i = 0, j = n - 1; 
        while (i < n && j >= 0) {
            if (matrix[i][j] > target) { 
                j--;
            } else { 
                count += j + 1;
                i++;
            }
        }
        return count;
    }
private int sample_funcname ( int [ ] [ ] var_0 , int var_1 ) {
  int var_3 = var_0 . length ;
  int var_5 = 0 ;
  int var_6 = 0 , var_8 = var_3 - 1 ;
  while ( var_6 < var_3 && var_8 >= 0 ) {
    if ( var_0 [ var_6 ] [ var_8 ] > var_1 ) {
      var_8 -- ;
    }
    else {
      var_5 += var_8 + 1 ;
      var_6 ++ ;
    }
  }
  return var_5 ;
}
