<gouthampradhan>math_ProjectionAreaOf3DShapes_1.java
public int projectionArea(int[][] grid) {
    int area = 0;
    for (int i = 0; i < grid.length; i++) {
      for (int j = 0; j < grid.length; j++) {
        area += (grid[i][j] > 0 ? 1 : 0);
      }
    }
    for (int i = 0; i < grid.length; i++) {
      int max = 0;
      for (int j = 0; j < grid[0].length; j++) {
        max = Math.max(max, grid[i][j]);
      }
      area += max;
    }
    for (int i = 0; i < grid[0].length; i++) {
      int max = 0;
      for (int j = 0; j < grid.length; j++) {
        max = Math.max(max, grid[j][i]);
      }
      area += max;
    }
    return area;
  }
public int sample_funcname ( int [ ] [ ] var_0 ) {
  int var_2 = 0 ;
  for ( int var_3 = 0 ;
  var_3 < var_0 . length ;
  var_3 ++ ) {
    for ( int var_5 = 0 ;
    var_5 < var_0 . length ;
    var_5 ++ ) {
      var_2 += ( var_0 [ var_3 ] [ var_5 ] > 0 ? 1 : 0 ) ;
    }
  }
  for ( int var_3 = 0 ;
  var_3 < var_0 . length ;
  var_3 ++ ) {
    int max = 0 ;
    for ( int var_5 = 0 ;
    var_5 < var_0 [ 0 ] . length ;
    var_5 ++ ) {
      max = Math . max ( max , var_0 [ var_3 ] [ var_5 ] ) ;
    }
    var_2 += max ;
  }
  for ( int var_3 = 0 ;
  var_3 < var_0 [ 0 ] . length ;
  var_3 ++ ) {
    int max = 0 ;
    for ( int var_5 = 0 ;
    var_5 < var_0 . length ;
    var_5 ++ ) {
      max = Math . max ( max , var_0 [ var_5 ] [ var_3 ] ) ;
    }
    var_2 += max ;
  }
  return var_2 ;
}
