First, bubble sorting (bubble)
Using system;
Namespace bubblesorter {public class bubblesorter {public void sort (int [] list) {INT i, J, TEMP; BOOL DONE = false; j = 1; while (j
Public class mainclass {public static void main () {int [] IARRARY = new int = {1, 5, 13, 6, 10, 55, 99, 2, 87, 12, 34, 75, 33, 47}; Bubblesorter sh = new bubblesorter (); sh.sort (IARRARY); For (int m = 0; m Second, choose sorting (SELECTION) Using system; Namespace SelectionSORTER {public class selectionsorter {private int min; public void sort (int [] list) {for (int i = 0; i Public class mainclass {public static void main () {int [] IARRARY = new int = {1,5, 3, 6, 10, 55, 9, 2, 87, 12, 34, 75, 33, 47}; SelectionSORTER SS = New SelectionSorter (); ss.sort (IARRARY); For (int m = 0; M Third, insertion sort (InsertionsRertions) Using system; Namespace INSERTIONSORTER {public void sort (int [] list) {for (int i = 1; i Four, Hill Sort (SHELLSORTER) Using system; Namespace shellsorter {public class shellsorter {public void sort (int [] list) {int Inc; for (inc= 1; inc, = list.length / 9; inc= 3 * inc 1); for (; inc> 0 ; inc / = 3) {for (INT i = inc 1; i <= list.length; i = inc) {INT T = List [i-1]; int J = i; while ((j> inc) && (List [J-INC-1]> T)) {List [J-1] = List [J-INC-1]; J- = Inc;} List [J-1] = T;}}}} Public class mainclass {public static void main () {int [] IARRARY = new int = {1, 5, 13, 6, 10, 55, 99, 2, 87, 12, 34, 75, 33, 47}; ShellsRer sh = new shellsorter (); sh.sort (IARRARY); For (int m = 0; m