comefrom: <awangdev>Perfect Squares_4.java
code: public int numSquares(int n) {
          if (n <= 0) {
          	return 0;
          }
          int[] dp = new int[n + 1];
          dp[0] = 0;
  
          for (int i = 1; i <= n; i++) {
          	int maxSqrNum = (int)Math.floor(Math.sqrt(i));
          	int min = Integer.MAX_VALUE;
          	for (int j = 1; j <= maxSqrNum; j++) {
          		min = Math.min(min, dp[i - j * j] + 1);
          	}
          	dp[i] = min;
          }
          return dp[n];
      }
masked: public int sample_funcname ( int var_0 ) {
    if ( var_0 <= 0 ) {
      return 0 ;
    }
    int [ ] var_3 = new int [ var_0 + 1 ] ;
    var_3 [ 0 ] = 0 ;
    for ( int var_4 = 1 ;
    var_4 <= var_0 ;
    var_4 ++ ) {
      int var_8 = ( int ) Math . floor ( Math . sqrt ( var_4 ) ) ;
      int min = Integer . MAX_VALUE ;
      for ( int var_12 = 1 ;
      var_12 <= var_8 ;
      var_12 ++ ) {
        min = Math . min ( min , var_3 [ var_4 - var_12 * var_12 ] + 1 ) ;
      }
      var_3 [ var_4 ] = min ;
    }
    return var_3 [ var_0 ] ;
  }
  