コード例 #1
0
ファイル: SnailTests.cs プロジェクト: homorozeanu/codewars
        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
ファイル: Program.cs プロジェクト: homorozeanu/codewars
        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);
            }
        }