Upgrade 12.11.

master
freverda 2022-11-12 16:12:19 +01:00
parent 873b41722c
commit b39587b4d5
2 changed files with 20 additions and 2 deletions

View File

@ -23,15 +23,26 @@ public class InsertionSort
System.out.println(+Array[i]);
}
//Vergleichen und Vertauschen
System.out.println("Sortierter Array:");
for(int i = 0; i<Array.length; i++){
for(int j = i+1; j<Array.length; j++){
int ArrayToSort = Array[i];
int j = i;
while(ArrayToSort < Array[j+1]){
Array[j] = Array[j-1];
}
Array[j] = ArrayToSort;
System.out.println(ArrayToSort);
}
}
}
}

7
__SHELL11.java Normal file
View File

@ -0,0 +1,7 @@
public class __SHELL11 extends bluej.runtime.Shell {
public static void run() throws Throwable {
InsertionSort.InsertionSort();
}}