Ejemplo n.º 1
0
        public void Not_Perm_When_duplicate_exist()
        {
            var counting = new CountingElement();
            var nums     = new int[] { 3, 1, 2, 4, 3 };

            Assert.Equal(0, counting.Check_Perm(nums));
        }
Ejemplo n.º 2
0
        public void Is_Perm()
        {
            var counting = new CountingElement();
            var nums     = new int[] { 1, 2, 4, 3 };

            Assert.Equal(1, counting.Check_Perm(nums));
        }
Ejemplo n.º 3
0
        public void MissingIntegerTest1()
        {
            var counting = new CountingElement();
            var nums     = new int[] { 3, 1, 2, 4, 3 };

            Assert.Equal(5, counting.MissingInteger1(nums));
            Assert.Equal(5, counting.MissingInteger2(nums));
        }