<awangdev>Counting Bits_1.java
public int[] countBits(int num) {
        if (num < 0) {
            return null;
        }
        int[] dp = new int[num + 1];
        dp[0] = 0;
        for (int i = 1; i <= num; i++) {
            int prevNum = i >> 1;
            dp[i] = dp[prevNum] + (i % 2);
        }
        return dp;
    }
public int [ ] sample_funcname ( int var_0 ) {
  if ( var_0 < 0 ) {
    return null ;
  }
  int [ ] var_4 = new int [ var_0 + 1 ] ;
  var_4 [ 0 ] = 0 ;
  for ( int var_5 = 1 ;
  var_5 <= var_0 ;
  var_5 ++ ) {
    int var_6 = var_5 >> 1 ;
    var_4 [ var_5 ] = var_4 [ var_6 ] + ( var_5 % 2 ) ;
  }
  return var_4 ;
}
