public void Test1() { var solution = new LeetCode.P122.Solution(); var result = solution.MaxProfit(new int[] { 7, 1, 5, 3, 6, 4 }); Assert.Equal(7, result); }
public void Test4() { var solution = new LeetCode.P122.Solution(); var result = solution.MaxProfit(new int[] { 2, 4, 1 }); Assert.Equal(2, result); }
public void Test5() { var solution = new LeetCode.P122.Solution(); var result = solution.MaxProfit(new int[] { 6, 1, 3, 2, 4, 7 }); Assert.Equal(7, result); }
public void Test2() { var solution = new LeetCode.P122.Solution(); var result = solution.MaxProfit(new int[] { 1, 2, 3, 4, 5 }); Assert.Equal(4, result); }