refactor some codes
This commit is contained in:
parent
cb5097359b
commit
933ccb74ba
Binary file not shown.
Binary file not shown.
|
@ -25,6 +25,7 @@ public class RecursiveExercise {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove the last element
|
// Remove the last element
|
||||||
|
|
||||||
public static int[] removeLast(int[] ia1, int[] ia2, int i) {
|
public static int[] removeLast(int[] ia1, int[] ia2, int i) {
|
||||||
ia2[i] = ia1[i];
|
ia2[i] = ia1[i];
|
||||||
if (i == ia2.length - 1)
|
if (i == ia2.length - 1)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
|
||||||
public class RecursiveExerciseNoExtMethod {
|
public class RecursiveExerciseSandwich {
|
||||||
|
|
||||||
// return an array that has all data of ht and n,
|
// return an array that has all data of ht and n,
|
||||||
// just like concatenating ht and n.
|
// just like concatenating ht and n.
|
Loading…
Reference in New Issue