Beispiel #1
0
 static void Main(string[] args)
 {
     BinaryGap.Test();
     CyclicRotation.Test();
     OddOccurrencesInArray.Test();
     TapeEquilibrium.Test();
     PermCheck.Test();
     FrogRiverOne.Test();
     MissingInteger.Test();
 }
Beispiel #2
0
        public static void Test()
        {
            var missingInteger = new MissingInteger();

            int[] A      = new int[] { 1, 3, 6, 4, 1, 2 };
            int   result = missingInteger.Solution(A);

            TestBuddy.PrintTestResult(5, result);

            A      = new int[] { 3, 6, 4, 1, 2, 5, 7 };
            result = missingInteger.Solution(A);
            TestBuddy.PrintTestResult(8, result);

            A      = new int[] { 3, 6, 4, 1000, 2, -2, 0 };
            result = missingInteger.Solution(A);
            TestBuddy.PrintTestResult(1, result);
        }