예제 #1
0
        private void Test(int[][] array, int[] result)
        {
            var text = $"{Int2dToString(array)}\nshould be sorted to\n[{string.Join(",", result)}]\n";

            Console.WriteLine(text);
            Assert.AreEqual(result, SnailSolution.Snail(array));
        }
예제 #2
0
        static void Main(string[] args)
        {
            int[][] array =
            {
                new[] { 1, 2, 3, 1 },
                new[] { 4, 5, 6, 4 },
                new[] { 7, 8, 9, 7 },
                new[] { 7, 8, 9, 7 }
            };

            var snail = SnailSolution.Snail(array);

            foreach (var val in snail)
            {
                Console.WriteLine(val);
            }
        }