@ -26,4 +26,11 @@ public class ArrayManipulation {
}
return newArray;
public static int[] removeLast(int[] arr) {
int[] result = new int[arr.length-1];
for (int i = 0; i < arr.length-1; i++) {
result[i] = arr[i];
return result;