comefrom: <gouthampradhan>dynamic_programming_BombEnemy_1.java
code: public int maxKilledEnemies(char[][] grid) {
      int[][] DP1 = new int[grid.length][grid[0].length];
      int[][] DP2 = new int[grid.length][grid[0].length];
      for (int i = 0; i < grid.length; i++) {
        for (int j = 0; j < grid[0].length; j++) {
          if (grid[i][j] == 'E') {
            DP1[i][j] = 1;
          }
          if (grid[i][j] != 'W') {
            if (j - 1 >= 0) {
              DP1[i][j] += DP1[i][j - 1];
            }
            if (i - 1 >= 0) {
              DP1[i][j] += DP1[i - 1][j];
            }
          }
        }
      }
      for (int i = grid.length - 1; i >= 0; i--) {
        for (int j = grid[0].length - 1; j >= 0; j--) {
          if (grid[i][j] == 'E') {
            DP2[i][j] = 1;
          }
          if (grid[i][j] != 'W') {
            if (j + 1 < grid[0].length) {
              DP2[i][j] += DP2[i][j + 1];
            }
            if (i + 1 < grid.length) {
              DP2[i][j] += DP2[i + 1][j];
            }
          }
        }
      }
      int max = 0;
      for (int i = 0; i < grid.length; i++) {
        for (int j = 0; j < grid[0].length; j++) {
          if (grid[i][j] == '0') {
            max = Math.max(max, DP1[i][j] + DP2[i][j]);
          }
        }
      }
      return max;
    }
masked: public int sample_funcname ( char [ ] [ ] var_0 ) {
    int [ ] [ ] var_3 = new int [ var_0 . length ] [ var_0 [ 0 ] . length ] ;
    int [ ] [ ] var_4 = new int [ var_0 . length ] [ var_0 [ 0 ] . length ] ;
    for ( int var_5 = 0 ;
    var_5 < var_0 . length ;
    var_5 ++ ) {
      for ( int var_6 = 0 ;
      var_6 < var_0 [ 0 ] . length ;
      var_6 ++ ) {
        if ( var_0 [ var_5 ] [ var_6 ] == 'E' ) {
          var_3 [ var_5 ] [ var_6 ] = 1 ;
        }
        if ( var_0 [ var_5 ] [ var_6 ] != 'W' ) {
          if ( var_6 - 1 >= 0 ) {
            var_3 [ var_5 ] [ var_6 ] += var_3 [ var_5 ] [ var_6 - 1 ] ;
          }
          if ( var_5 - 1 >= 0 ) {
            var_3 [ var_5 ] [ var_6 ] += var_3 [ var_5 - 1 ] [ var_6 ] ;
          }
        }
      }
    }
    for ( int var_5 = var_0 . length - 1 ;
    var_5 >= 0 ;
    var_5 -- ) {
      for ( int var_6 = var_0 [ 0 ] . length - 1 ;
      var_6 >= 0 ;
      var_6 -- ) {
        if ( var_0 [ var_5 ] [ var_6 ] == 'E' ) {
          var_4 [ var_5 ] [ var_6 ] = 1 ;
        }
        if ( var_0 [ var_5 ] [ var_6 ] != 'W' ) {
          if ( var_6 + 1 < var_0 [ 0 ] . length ) {
            var_4 [ var_5 ] [ var_6 ] += var_4 [ var_5 ] [ var_6 + 1 ] ;
          }
          if ( var_5 + 1 < var_0 . length ) {
            var_4 [ var_5 ] [ var_6 ] += var_4 [ var_5 + 1 ] [ var_6 ] ;
          }
        }
      }
    }
    int max = 0 ;
    for ( int var_5 = 0 ;
    var_5 < var_0 . length ;
    var_5 ++ ) {
      for ( int var_6 = 0 ;
      var_6 < var_0 [ 0 ] . length ;
      var_6 ++ ) {
        if ( var_0 [ var_5 ] [ var_6 ] == '0' ) {
          max = Math . max ( max , var_3 [ var_5 ] [ var_6 ] + var_4 [ var_5 ] [ var_6 ] ) ;
        }
      }
    }
    return max ;
  }
  