示例#1
0
        public void ContainsNearbyDuplicate_1()
        {
            var solution = new _0219_ContainsDuplicateII();
            var result   = solution.ContainsNearbyDuplicate(new int[] { 1, 2, 3, 1 }, 3);

            Assert.IsTrue(result);
        }
示例#2
0
        public void ContainsNearbyDuplicate_3()
        {
            var solution = new _0219_ContainsDuplicateII();
            var result   = solution.ContainsNearbyDuplicate(new int[] { 1, 2, 3, 1, 2, 3 }, 2);

            Assert.IsFalse(result);
        }