Beispiel #1
0
        public void TestPermutations_2()
        {
            var input = new List <int>()
            {
                1, 2, 3
            };
            List <IList <int> > expectedOutput = new List <IList <int> >()
            {
                new List <int>()
                {
                    1, 2, 3
                },
                new List <int>()
                {
                    1, 3, 2
                },
                new List <int>()
                {
                    2, 1, 3
                },
                new List <int>()
                {
                    2, 3, 1
                },
                new List <int>()
                {
                    3, 1, 2
                },
                new List <int>()
                {
                    3, 2, 1
                },
            };

            var output = GetAllPermutations.Get(input, 3);

            expectedOutput.Should().BeEquivalentTo(output);
        }
Beispiel #2
0
 static void Main()
 {
     GetAllPermutations.Init();
 }