コード例 #1
0
        public void MinSetSize_5()
        {
            var solution = new _1338_ReduceArraySizeToTheHalf();
            var result   = solution.MinSetSize(new int[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 });

            Assert.AreEqual(5, result);
        }
コード例 #2
0
        public void MinSetSize_1()
        {
            var solution = new _1338_ReduceArraySizeToTheHalf();
            var result   = solution.MinSetSize(new int[] { 3, 3, 3, 3, 5, 5, 5, 2, 2, 7 });

            Assert.AreEqual(2, result);
        }
コード例 #3
0
        public void MinSetSize_4()
        {
            var solution = new _1338_ReduceArraySizeToTheHalf();
            var result   = solution.MinSetSize(new int[] { 1000, 1000, 3, 7 });

            Assert.AreEqual(1, result);
        }