我是否正确地说这段代码的运行时复杂性是(2N + 2)?
public static int[] mystery1(int[] list) {
int[] result = new int[2*list.length];
for (int i = 0; i < list.length; i++) {
result[2 * i] + list[i] / 2 + list[i] % 2;
result[2 * i + 1] = list[i] / 2;
}
return result;
}
感谢您的帮助!