Esempio n. 1
0
        public void TestFactorEasy1()
        {
            Knot knot = new Knot(new List <int>()
            {
                -1, 2, -3, 1, -2, 3, -4, 5, -6, 4, -5, 6, -7, 8, -9, 10, -8, 7, -10, 9
            });

            int[] expected = new int[3] {
                3, 3, 4
            };
            int[] factors = Knot.Factorize(knot);
            bool  isEqual = Enumerable.SequenceEqual(expected, factors);

            Assert.AreEqual(true, isEqual);
        }