public void TestMethod1(int[] nums, int k, bool expected)
        {
            // Arrange
            ContainsDuplicateII question = new ContainsDuplicateII();

            // Act
            bool actual = question.ContainsNearbyDuplicate(nums, k);

            // Assert
            Assert.AreEqual(expected, actual);
        }
Esempio n. 2
0
        public bool SampleTests(int[] input, int k)
        {
            var kata = new ContainsDuplicateII();

            return(kata.ContainsNearbyDuplicate(input, k));
        }