<awangdev>198. House Robber_3.java
public int rob(int[] nums) {
        if (nums == null || nums.length == 0) return 0;
        int n = nums.length;
        int[][] dp = new int[n][2];
        dp[0][1] = nums[0];
        for (int i = 1; i < n; i++) {
            dp[i][0] = Math.max(dp[i - 1][1], dp[i - 1][0]);
            dp[i][1] = dp[i - 1][0] + nums[i];
        }
        
        return Math.max(dp[n - 1][0], dp[n - 1][1]);
    }
public int sample_funcname ( int [ ] var_0 ) {
  if ( var_0 == null || var_0 . length == 0 ) return 0 ;
  int var_4 = var_0 . length ;
  int [ ] [ ] var_6 = new int [ var_4 ] [ 2 ] ;
  var_6 [ 0 ] [ 1 ] = var_0 [ 0 ] ;
  for ( int var_8 = 1 ;
  var_8 < var_4 ;
  var_8 ++ ) {
    var_6 [ var_8 ] [ 0 ] = Math . max ( var_6 [ var_8 - 1 ] [ 1 ] , var_6 [ var_8 - 1 ] [ 0 ] ) ;
    var_6 [ var_8 ] [ 1 ] = var_6 [ var_8 - 1 ] [ 0 ] + var_0 [ var_8 ] ;
  }
  return Math . max ( var_6 [ var_4 - 1 ] [ 0 ] , var_6 [ var_4 - 1 ] [ 1 ] ) ;
}
