private void Form1_Load(object sender, EventArgs e) { this.Text = "Núumero menor"; menor = 1000; textBox1.Text = menor.ToString(); s = new Compara(Menor); }
public static void Burbuja(T[] numeros, Compara orden) { for (int i = 0; i < numeros.Length; ++i) { for (int j = 0; j < numeros.Length - 1; ++j) { if (orden(numeros[j + 1], numeros[j])) { swap(ref numeros[j + 1], ref numeros[j]); } } } }
public static void SelectionSort(T[] numeros, Compara orden) { Console.WriteLine("Estoy utilizando SelectionSort"); }
public static void HeapSort(T[] numeros, Compara orden) { Console.WriteLine("Estoy utilizando HeapSort"); }
public Ordenamiento(T[] n, AlgoritmoOrdenamiento algoritmo, Compara orden) { algoritmo(n, orden); }