Example #1
0
        public void ThreeSumExists()
        {
            int[] nums     = { 11, 2, 5, 7, 3 };
            var   target   = 21;
            var   expected = true;
            var   actual   = ThreeSumSolution.HasThreeSum(nums, target);

            Assert.Equal(expected, actual);
        }
Example #2
0
        public void ThreeSumDoesNotExist()
        {
            int[] nums     = { 11, 2, 5, 7, 3 };
            var   target   = 22;
            var   expected = false;
            var   actual   = ThreeSumSolution.HasThreeSum(nums, target);

            Assert.Equal(expected, actual);
        }