示例#1
0
        public void TestLastMissingElement()
        {
            int[] A      = { 1, 2, 3 };
            int   result = MissingElementFinder.Find(A);

            Assert.AreEqual(result, 4);
        }
示例#2
0
        public void TestFirstMissingElement()
        {
            int[] A      = { 2, 3, 4 };
            int   result = MissingElementFinder.Find(A);

            Assert.AreEqual(result, 1);
        }
示例#3
0
        public void TestMissingElementSingleElement()
        {
            int[] A      = { 2 };
            int   result = MissingElementFinder.Find(A);

            Assert.AreEqual(result, 1);

            int[] B = { 1 };
            result = MissingElementFinder.Find(B);
            Assert.AreEqual(result, 2);
        }