Пример #1
0
        private void btnBubble_15000_Click(object sender, EventArgs e)
        {
            Algorithms  a  = new Algorithms();
            RandomArray r  = new RandomArray();
            Stopwatch   sw = new Stopwatch();

            sw.Start();
            a.Bubble(r.randomOnBesBin);
            sw.Stop();
            MessageBox.Show("Bubble Sort algorithm's array sorting performance with 15000 elements: " + sw.ElapsedMilliseconds.ToString());
        }
Пример #2
0
        private void btnQuick_100_Click(object sender, EventArgs e)
        {
            Algorithms  a  = new Algorithms();
            RandomArray r  = new RandomArray();
            Stopwatch   sw = new Stopwatch();

            sw.Start();
            a.quickSort(r.randomYuz, 0, 99);
            sw.Stop();
            MessageBox.Show("Quick Sort algorithm's array sorting performance with 100 elements: " + sw.ElapsedMilliseconds.ToString());
        }
Пример #3
0
        private void btnSelection_7500_Click(object sender, EventArgs e)
        {
            Algorithms  a  = new Algorithms();
            RandomArray r  = new RandomArray();
            Stopwatch   sw = new Stopwatch();

            sw.Start();
            a.Selection(r.randomYediBinBesYuz);
            sw.Stop();
            MessageBox.Show("Selection Sort algorithm's array sorting performance with 7500 elements: " + sw.ElapsedMilliseconds.ToString());
        }
Пример #4
0
        private void btnBubble_100_Click(object sender, EventArgs e)
        {
            Algorithms  a  = new Algorithms();
            RandomArray r  = new RandomArray();
            Stopwatch   sw = new Stopwatch();

            sw.Start();
            a.Bubble(r.randomYuz);
            sw.Stop();
            TimeSpan t = sw.Elapsed;

            MessageBox.Show("Bubble Sort algorithm's array sorting performance with 100 elements: " + t.TotalMilliseconds);
        }