标签:codehunt
codehunt Level 02.01 原题大意如下 :
假设给定下列函数声明
public static int[] Puzzle(int n) {
return null;
}n 值
1 {0}
2 {0, 1}
3 {0, 1, 2}public static int[] Puzzle(int n) {
int[] re = new int[n];
for (int i=0; i<n; i++) re[i] = i;
return re;
}
请问:有人能说明一下为什么只得1个方块,是效率不高?还是其它什么原因?
关于codehunt Level 02.01 的疑问,布布扣,bubuko.com
标签:codehunt
原文地址:http://blog.csdn.net/darkinger/article/details/27493967