Anonymous Anonymous - 5 months ago 259 0

No description

C#

Bubble Short not working

public static int[] Sort(int[] elements)
        {
            int i = 0;
            do
            {
                if (elements[i] > elements[i + 1])
                {
                    int tmpInt = elements[i];
                    elements[i] = elements[i + 1];
                    elements[i + 1] = tmpInt;
                }

                Print(i, elements);

                i++;
            }
            while (i < elements.Length - 1);

            return elements;
        }
Comments