Exemple #1
0
        public void Test4()
        {
            int expected = -1;

            int[] arr    = null;
            var   actual = Class24.FindPeak(arr);

            Assert.Equal(expected, actual);
        }
Exemple #2
0
        public void Test2()
        {
            int expected = 1;

            int[] arr    = new int[] { -1, 3, -4, -5, 2 };
            var   actual = Class24.FindPeak(arr);

            Assert.Equal(expected, actual);
        }
Exemple #3
0
        public void Test3()
        {
            int expected = 0;

            int[] arr    = new int[] { -1 };
            var   actual = Class24.FindPeak(arr);

            Assert.Equal(expected, actual);
        }
Exemple #4
0
        public void Test1()
        {
            int expected = 3; //index

            int[] arr    = new int[] { 1, 3, 4, 5, 2 };
            var   actual = Class24.FindPeak(arr);

            Assert.Equal(expected, actual);
        }