<awangdev>Triangles_2.java
public int minimumTotal(List<List<Integer>> triangle) {
        if (triangle == null || triangle.size() == 0) {
            return 0;
        }
        int n = triangle.size();
        int[][] dp = new int[2][n];
        for (int j = 0; j < n; j++) {
            dp[(n - 1) % 2][j] = triangle.get(n - 1).get(j);
        }
        for (int i = n - 2; i >= 0; i--) {
            for (int j = 0; j <= i; j++) {
                dp[i % 2][j] = Math.min(dp[(i + 1)%2][j], dp[(i + 1)%2][j + 1]) + triangle.get(i).get(j);
            }
        }
        return dp[0][0];
    }
public int sample_funcname ( List < List < Integer >> var_2 ) {
  if ( var_2 == null || var_2 . size ( ) == 0 ) {
    return 0 ;
  }
  int var_6 = var_2 . size ( ) ;
  int [ ] [ ] var_8 = new int [ 2 ] [ var_6 ] ;
  for ( int var_9 = 0 ;
  var_9 < var_6 ;
  var_9 ++ ) {
    var_8 [ ( var_6 - 1 ) % 2 ] [ var_9 ] = var_2 . get ( var_6 - 1 ) . get ( var_9 ) ;
  }
  for ( int var_12 = var_6 - 2 ;
  var_12 >= 0 ;
  var_12 -- ) {
    for ( int var_9 = 0 ;
    var_9 <= var_12 ;
    var_9 ++ ) {
      var_8 [ var_12 % 2 ] [ var_9 ] = Math . min ( var_8 [ ( var_12 + 1 ) % 2 ] [ var_9 ] , var_8 [ ( var_12 + 1 ) % 2 ] [ var_9 + 1 ] ) + var_2 . get ( var_12 ) . get ( var_9 ) ;
    }
  }
  return var_8 [ 0 ] [ 0 ] ;
}
