Skip to content

Instantly share code, notes, and snippets.

@KimiyukiYamauchi
Created November 25, 2020 03:40
Show Gist options
  • Save KimiyukiYamauchi/74165046e16471573a717585d94d61fd to your computer and use it in GitHub Desktop.
Save KimiyukiYamauchi/74165046e16471573a717585d94d61fd to your computer and use it in GitHub Desktop.
public int [] ex4_8(int [] a, int idx, int n){
int num[] = new int[idx];
ArrayList<Integer> hoge = new ArrayList<Integer>();
for(int i=0;i<= a.length-1;i++){
hoge.add(a[i]);
}
//
for(int j= idx;j< n+idx;j++){
if (idx != n) {
hoge.remove(idx);
}
}
//
int [] ret = new int[hoge.size()];
for (int s = 0; s < ret.length;s++){
ret[s] = hoge.get(s);
}
return ret;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment