From 583bf5b58b00297b1a025374aa60f34f4a939b2a Mon Sep 17 00:00:00 2001 From: Nico B Date: Thu, 21 Apr 2022 14:10:59 +0200 Subject: [PATCH 1/9] Initial commit --- .gitattributes | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..dfe0770 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +# Auto detect text files and perform LF normalization +* text=auto From a03074885700f81bdea3ed4f5e3b6a5080e59b08 Mon Sep 17 00:00:00 2001 From: Lea Anton Date: Thu, 21 Apr 2022 14:11:02 +0200 Subject: [PATCH 2/9] Initial commit --- .gitattributes | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..dfe0770 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +# Auto detect text files and perform LF normalization +* text=auto From c8db5eecc7bbbddd0423dea2c095e7582950b6a3 Mon Sep 17 00:00:00 2001 From: Nico B Date: Thu, 21 Apr 2022 14:40:33 +0200 Subject: [PATCH 3/9] removeLast MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Methode remove hinzugefĆ¼gt --- .project | 11 +++++++++++ ArrayManipulation.class | Bin 0 -> 839 bytes ArrayManipulation.java | 22 ++++++++++++++++++++++ 3 files changed, 33 insertions(+) create mode 100644 .project create mode 100644 ArrayManipulation.class create mode 100644 ArrayManipulation.java diff --git a/.project b/.project new file mode 100644 index 0000000..259b75b --- /dev/null +++ b/.project @@ -0,0 +1,11 @@ + + + Prog2 + + + + + + + + diff --git a/ArrayManipulation.class b/ArrayManipulation.class new file mode 100644 index 0000000000000000000000000000000000000000..ebd393cc045a0d8eb9862f67f050ffed782d750f GIT binary patch literal 839 zcmZuvO>fgc5PfSqabldNZJN;53895T;z)@EM;auAgcK>oNI^wbPMc&^xj1&@IFWkq zFX@FVaDWO``2qX~egk*J*Q`@iq1K1lncbQ9-i+t#?=K4gZ8QuhP<3b~Qb;qb9`iYG z`8+skIfG*{j2Y7VUf{(~8Pr<+FpCVbIt&xHVE&ihJDJ8}Oj+TKii+I?$O~JqA}@%0 zaU}ToiGda5b*!3L!#cy-vnb*x2R!g5GoQy^7%-TTn2TsCk|!ds^*i-`$G`@PI!Y#P zWAh*FEcX0Xk~d|@#37M*!4X4A)-3sxMwa(Pz70!9*+d0*7z#HCWY8y4u1`XWwd)Y| zL)pPy6FXAA5s7g)7hOK3hPCJ6NHFBPULao1#sd+(<^!K@a=n-j-yZNu66<)tp!7Rb zFy-(y>DSPktJh{DWk7DXP%P=uFw4!9I|~aF48f z22^C_{K=Q8g344nZFS$W7b*V?JGRwq+m>xFw2?JxI+sq_Ic4nKpKtbi%2pD*Z9)WX zgh7ZaWVdK5b}6nQhx_!Bh4K>$`++@jX=ay{E~%B2RmpH+bk%lQdS}Qt%67TwoGQfg zy>Z1;B8?!;ItpYrXbB3`VkzM;q5P67xkoewqIpQ{%g){qjU3M7%!T2qn&WCI$4#Xj uH?2Fao^iS#p*PNvJ4fLYww6J48C;EQoj?E!n Date: Thu, 21 Apr 2022 14:43:17 +0200 Subject: [PATCH 4/9] hello System print hello --- ArrayManipulation.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/ArrayManipulation.java b/ArrayManipulation.java index 22b6ed2..04d7f9b 100644 --- a/ArrayManipulation.java +++ b/ArrayManipulation.java @@ -12,11 +12,22 @@ public class ArrayManipulation { } return arr; + } + public static int [] removeLast(int[] arr) { + int [] result = new int [arr.length-1]; + + for (int i =0; i Date: Thu, 21 Apr 2022 14:44:47 +0200 Subject: [PATCH 5/9] Create ArrayManipulation.java --- ArrayManipulation.java | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 ArrayManipulation.java diff --git a/ArrayManipulation.java b/ArrayManipulation.java new file mode 100644 index 0000000..bf610b4 --- /dev/null +++ b/ArrayManipulation.java @@ -0,0 +1,37 @@ +import java.util.Arrays; + +public class ArrayManipulation { + + + public static int[] reverseArray(int[] arr) { + + for (int i = 0; i < arr.length/2; i++) { + int tmp = arr[i]; + arr[i] = arr[arr.length - 1 - i]; + arr[arr.length - 1 - i] = tmp; + } + return arr; + + } + + public static int[] removeFirst(int[] arr) { + + int length = arr.length; + int[] result = new int[length - 1]; + + for (int i = 1; i < arr.length; i++) { + result[i-1] = arr[i]; + } + + return result; + } + + + public static void main(String[] args) { + + int[] arr = {1,2,3,4,5}; + System.out.println(Arrays.toString(reverseArray(arr))); + System.out.println(Arrays.toString(removeFirst(arr))); + + } +} From 3b6e74f407d2416729486faf411d9ab04eaf6244 Mon Sep 17 00:00:00 2001 From: Nico B Date: Thu, 21 Apr 2022 15:12:13 +0200 Subject: [PATCH 6/9] Update ArrayManipulation.java --- ArrayManipulation.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ArrayManipulation.java b/ArrayManipulation.java index 04d7f9b..7039d25 100644 --- a/ArrayManipulation.java +++ b/ArrayManipulation.java @@ -27,7 +27,7 @@ public class ArrayManipulation { int[] arr = {1,2,3,4,5}; System.out.println(Arrays.toString(reverseArray(arr))); System.out.println(Arrays.toString(removeLast(arr))); - System.out.println("Hello"); + } } From bc36dc33590a040b930a1d7728a31190c1f50faf Mon Sep 17 00:00:00 2001 From: Lea Anton Date: Mon, 25 Apr 2022 11:08:24 +0200 Subject: [PATCH 7/9] added ArrayManipulation --- ArrayManipulation.java | 1 - 1 file changed, 1 deletion(-) diff --git a/ArrayManipulation.java b/ArrayManipulation.java index bf610b4..0e4f22d 100644 --- a/ArrayManipulation.java +++ b/ArrayManipulation.java @@ -11,7 +11,6 @@ public class ArrayManipulation { arr[arr.length - 1 - i] = tmp; } return arr; - } public static int[] removeFirst(int[] arr) { From 313680c6b6c30f365547445c718b2c8d5738f537 Mon Sep 17 00:00:00 2001 From: fdai6998 Date: Thu, 28 Apr 2022 14:55:37 +0200 Subject: [PATCH 8/9] =?UTF-8?q?.project=20gel=C3=B6scht?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .project | 11 ----------- 1 file changed, 11 deletions(-) delete mode 100644 .project diff --git a/.project b/.project deleted file mode 100644 index 259b75b..0000000 --- a/.project +++ /dev/null @@ -1,11 +0,0 @@ - - - Prog2 - - - - - - - - From e4d45524aff10ce5f92f95e25867bad6fcb3f6e3 Mon Sep 17 00:00:00 2001 From: fdai6998 Date: Thu, 28 Apr 2022 14:56:05 +0200 Subject: [PATCH 9/9] =?UTF-8?q?.class=20gel=C3=B6scht?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ArrayManipulation.class | Bin 839 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 ArrayManipulation.class diff --git a/ArrayManipulation.class b/ArrayManipulation.class deleted file mode 100644 index ebd393cc045a0d8eb9862f67f050ffed782d750f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 839 zcmZuvO>fgc5PfSqabldNZJN;53895T;z)@EM;auAgcK>oNI^wbPMc&^xj1&@IFWkq zFX@FVaDWO``2qX~egk*J*Q`@iq1K1lncbQ9-i+t#?=K4gZ8QuhP<3b~Qb;qb9`iYG z`8+skIfG*{j2Y7VUf{(~8Pr<+FpCVbIt&xHVE&ihJDJ8}Oj+TKii+I?$O~JqA}@%0 zaU}ToiGda5b*!3L!#cy-vnb*x2R!g5GoQy^7%-TTn2TsCk|!ds^*i-`$G`@PI!Y#P zWAh*FEcX0Xk~d|@#37M*!4X4A)-3sxMwa(Pz70!9*+d0*7z#HCWY8y4u1`XWwd)Y| zL)pPy6FXAA5s7g)7hOK3hPCJ6NHFBPULao1#sd+(<^!K@a=n-j-yZNu66<)tp!7Rb zFy-(y>DSPktJh{DWk7DXP%P=uFw4!9I|~aF48f z22^C_{K=Q8g344nZFS$W7b*V?JGRwq+m>xFw2?JxI+sq_Ic4nKpKtbi%2pD*Z9)WX zgh7ZaWVdK5b}6nQhx_!Bh4K>$`++@jX=ay{E~%B2RmpH+bk%lQdS}Qt%67TwoGQfg zy>Z1;B8?!;ItpYrXbB3`VkzM;q5P67xkoewqIpQ{%g){qjU3M7%!T2qn&WCI$4#Xj uH?2Fao^iS#p*PNvJ4fLYww6J48C;EQoj?E!n