<gouthampradhan>dynamic_programming_MinCostClimbingStairs_1.java
public int minCostClimbingStairs(int[] cost) {
    for (int i = cost.length - 1; i >= 0; i--) {
      if (i + 1 < cost.length && i + 2 < cost.length) {
        cost[i] = Math.min(cost[i] + cost[i + 1], cost[i] + cost[i + 2]);
      }
    }
    return Math.min(cost[0], cost[1]);
  }
public int sample_funcname ( int [ ] var_0 ) {
  for ( int var_3 = var_0 . length - 1 ;
  var_3 >= 0 ;
  var_3 -- ) {
    if ( var_3 + 1 < var_0 . length && var_3 + 2 < var_0 . length ) {
      var_0 [ var_3 ] = Math . min ( var_0 [ var_3 ] + var_0 [ var_3 + 1 ] , var_0 [ var_3 ] + var_0 [ var_3 + 2 ] ) ;
    }
  }
  return Math . min ( var_0 [ 0 ] , var_0 [ 1 ] ) ;
}
