Beispiel #1
0
        public void ThirdArray_Success_SecondApproach()
        {
            var arr    = new int[] { -4, -3, -2, -1, 60 };
            var sol    = new MaxProduct(arr);
            var result = sol.GetMaxProduct2();

            Assert.AreEqual(720, result);
        }
Beispiel #2
0
        public int MaximumProduct(int[] nums)
        {
            var sol = new MaxProduct(nums);

            return(sol.GetMaxProduct());
        }