Пример #1
0
        private static void Main(string[] args)
        {
            Console.WriteLine("Hello World!");

            //var prices = new int[] { 7, 1, 5, 3, 6, 4 };
            var prices = new int[] { 1, 2, 3, 4, 5, 6 };

            var s = new Solution3();

            Console.WriteLine(s.MaxProfit(prices));
        }
Пример #2
0
        private static void Main(string[] args)
        {
            Console.WriteLine("Hello World!");

            var prices = new int[] { 1, 3, 2, 8, 4, 9 };
            var fee    = 2;

            var s = new Solution3();

            Console.WriteLine(s.MaxProfit(prices, fee));
        }