public static void Main1() { CArray nums = new CArray(20); for (int i = 0; i < 20; i++) { nums.Insert(Utility.RandomInt(50)); } nums.DisplayElements(); }
public static CArray GetRandomArray(int count, int max) { CArray nums = new CArray(count); for (int i = 0; i < count; i++) { nums.Insert(Utility.RandomInt(max)); } return(nums); }
public static void Main4_InsertionSort() { var arr = CArray.GetRandomArray(15, 50); arr.InsertionSort_2(); }
public static void Main3_SelectionSort() { var arr = CArray.GetRandomArray(15, 50); arr.SelectionSort(); }
public static void Main2_BubbleSort() { var arr = CArray.GetRandomArray(15, 50); arr.BubbleSort(); }