**已关闭。**此问题需要调试详细信息。它目前不接受答案。
**想要改进此问题?**更新问题,使其位于堆栈溢出主题上。
五小时前关门了。
改进这个问题
int[] solution = new int[n];
int start=0;
int end=n-1;
int k=0;
while(start<=end){
solution[k++]=arr[end--];
solution[k++]=arr[start++];
}
for(int x=0;x<solution.length;x++){
arr[x]=solution[x];
}
上面的代码在编译时抛出arrayindexoutofbounds异常y?
暂无答案!
目前还没有任何答案,快来回答吧!