Ejemplo n.º 1
0
        public void MajorityElementTest_1()
        {
            var solution = new _0169_MajorityElement();
            var result   = solution.MajorityElement(new int[] { 3, 2, 3 });

            Assert.AreEqual(3, result);
        }
Ejemplo n.º 2
0
        public void MajorityElementTest_2()
        {
            var solution = new _0169_MajorityElement();
            var result   = solution.MajorityElement(new int[] { 2, 2, 1, 1, 1, 2, 2 });

            Assert.AreEqual(2, result);
        }