refactor some codes

This commit is contained in:
Siwat Sirichai 2020-11-04 09:46:08 +07:00
parent cb5097359b
commit 933ccb74ba
4 changed files with 2 additions and 1 deletions

View File

@ -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)

View File

@ -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.