-
-
Save KimiyukiYamauchi/74165046e16471573a717585d94d61fd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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