예제 #1
0
        public void FirstArray_Success()
        {
            int[] arr    = { 4, 3, 2, 7, 8, 2, 3, 1 };
            var   sol    = new FindDisappearedNumbers(arr);
            var   result = sol.GetFindDisappearedNumbers();

            Assert.IsNotNull(result);
            Assert.IsTrue(CheckArrayEquality(new int[] { 5, 6 }, result.ToArray()));
        }
예제 #2
0
        public void NullOfEmptyArray_Success()
        {
            int[] arr    = null;
            var   sol    = new FindDisappearedNumbers(arr);
            var   result = sol.GetFindDisappearedNumbers();

            Assert.IsNotNull(result);
            Assert.AreEqual(0, result.Count);
        }
예제 #3
0
        public IList <int> FindDisappearedNumbers(int[] nums)
        {
            var sol = new FindDisappearedNumbers(nums);

            return(sol.GetFindDisappearedNumbers());
        }