Пример #1
0
        public void Test162_6()
        {
            var sol  = new _162FindPeakElement();
            var nums = new int[] { 1 };
            var res  = sol.FindPeakElement(nums);

            Assert.AreEqual(0, res);
        }
Пример #2
0
        public void Test162_3()
        {
            var sol  = new _162FindPeakElement();
            var nums = new int[] { 0, 1, 0, 3, 4, 5, 6 };
            var res  = sol.FindPeakElement(nums);

            if (res != 1)
            {
                Assert.AreEqual(6, res);
            }
        }
Пример #3
0
        public void Test162_5()
        {
            var sol  = new _162FindPeakElement();
            var nums = new int[] { 1, 2, 1, 3, 5, 6, 4 };
            var res  = sol.FindPeakElement(nums);

            if (res != 1)
            {
                Assert.AreEqual(5, res);
            }
        }
Пример #4
0
        public void Test162_2()
        {
            var sol  = new _162FindPeakElement();
            var nums = new int[] { 4, 3, 1, 2, 1 };
            var res  = sol.FindPeakElement(nums);

            if (res != 0)
            {
                Assert.AreEqual(3, res);
            }
        }