Fix Code Formatting

This commit is contained in:
Siwat Sirichai 2020-11-04 10:02:26 +07:00
parent 933ccb74ba
commit b38f5ffc8e
2 changed files with 3 additions and 3 deletions

View File

@ -20,12 +20,12 @@ public class RecursiveExercise {
return null; return null;
if (ht.length == 1) if (ht.length == 1)
return ht.clone(); return ht.clone();
return append(new int[] { ht[ht.length - 1] }, return append(new int[] { ht[ht.length - 1] }, append(
append(reverse(MyArrayUtil.tail(removeLast(ht.clone(), new int[ht.length - 1], 0))), new int[] { ht[0] })); reverse(MyArrayUtil.tail(removeLast(ht.clone(), new int[ht.length - 1], 0))), new int[] { ht[0] }));
} }
// 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)