Exemple #1
0
        public void DominatorTest()
        {
            var leader = new Leader();
            var nums   = new int[] { 4, 3, 3, 3, 3, 3, 3, 2, 1, 5 };
            var nums2  = new int[] { 1, 2, 3, 3 };

            Assert.Equal(6, leader.Dominator(nums));
            Assert.Equal(-1, leader.Dominator(nums2));
        }