public void MaximizeProfit_Test() { RandomProblems r = new RandomProblems(); long result = 0; // result = r.MaximizeProfit (new int[] { 10, 100, 20, 30, 40, 50 }); // Console.WriteLine (result); // Assert.AreEqual (result, 120); // result = r.MaximizeProfit (new int[] { 30, 42, 25, 85, 100, 70, 110 }); // Console.WriteLine (result); // Assert.AreEqual (result, 127); result = r.MaximizeProfit(new int[] { 5, 10, 8, 30, 25, 35, 10, 50 }); Console.WriteLine(result); Assert.AreEqual(result, 75); }