예제 #1
0
        public static void SelectionSortReference(int[] arr)
        {
            int N = arr.Length;

            for (int i = 0; i < N - 1; i++)
            {
                for (int j = i + 1; j < N; j++)
                {
                    if (arr[i] > arr[j])
                    {
                        Trash.SwapTwoNums(ref arr[i], ref arr[j]);
                    }
                }
            }
        }
예제 #2
0
 public static void Main(string[] args)
 {
     // Test program...
     Trash.DrawDiagonals();
     Console.ReadKey();
 }