From b38f5ffc8e4b8babe4448dea47fa5956a355f7e6 Mon Sep 17 00:00:00 2001 From: Siwat Sirichai Date: Wed, 4 Nov 2020 10:02:26 +0700 Subject: [PATCH] Fix Code Formatting --- Assignment10/bin/RecursiveExercise.class | Bin 3744 -> 3744 bytes Assignment10/src/RecursiveExercise.java | 6 +++--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Assignment10/bin/RecursiveExercise.class b/Assignment10/bin/RecursiveExercise.class index 054c6ce1ae5948315703d4ed4b347aff26c515e2..f1c3ad2e42d7ed26633c63c34184869ca23cc9ef 100644 GIT binary patch delta 14 VcmZ1=yFhkBC_AIW<}h|Ib^s(P1StRj delta 14 VcmZ1=yFhkBC_AI`<}h|Ib^s(h1S|jm diff --git a/Assignment10/src/RecursiveExercise.java b/Assignment10/src/RecursiveExercise.java index 3980031..af58b2c 100644 --- a/Assignment10/src/RecursiveExercise.java +++ b/Assignment10/src/RecursiveExercise.java @@ -20,12 +20,12 @@ public class RecursiveExercise { return null; if (ht.length == 1) return ht.clone(); - return append(new int[] { ht[ht.length - 1] }, - append(reverse(MyArrayUtil.tail(removeLast(ht.clone(), new int[ht.length - 1], 0))), new int[] { ht[0] })); + return append(new int[] { ht[ht.length - 1] }, append( + reverse(MyArrayUtil.tail(removeLast(ht.clone(), new int[ht.length - 1], 0))), new int[] { ht[0] })); } // Remove the last element - + public static int[] removeLast(int[] ia1, int[] ia2, int i) { ia2[i] = ia1[i]; if (i == ia2.length - 1)