Exemplo n.º 1
0
        //        Ex : [-20, -5, -2, -9] :> -2(-2)
        //Ex : [20, -19, 6, 9, 4] :-> 20(20)
        //Ex : [20, -19, 6, 9, 4] -> 18 (10, -3, 4, -2, -1, 10)
        static void LargestSumOfContiguousArray()
        {
            var obj = new CareerCupQnA();

            obj.LargestSumOfContiguousArray(new int[] { -20, -5, -2, -9 });
            obj.LargestSumOfContiguousArray(new int[] { 20, -19, 6, 9, 4 });
            obj.LargestSumOfContiguousArray(new int[] { 10, -3, 4, -2, -1, 10 });
        }