public void BuySellStock15() { var response = BuyAndSellStock.MaxProfit(new int[] { 5, 32, 4, 29, 1, 39, 40 }); Assert.AreEqual(39, response); }
public void BuySellStock2() { var response = BuyAndSellStock.MaxProfit(new int[] { 7 }); Assert.AreEqual(0, response); }
public void BuySellStock14() { var response = BuyAndSellStock.MaxProfit(new int[] { 2, 7, 1, 4 }); Assert.AreEqual(5, response); }
public void BuySellStock13() { var response = BuyAndSellStock.MaxProfit(new int[] { 2, 1, 2, 1, 0, 0, 1 }); Assert.AreEqual(1, response); }
public void BuySellStock12() { var response = BuyAndSellStock.MaxProfit(new int[] { 3, 2, 6, 5, 0, 3 }); Assert.AreEqual(4, response); }
public void BuySellStock11() { var response = BuyAndSellStock.MaxProfit(new int[] { 9, 8, 9, 7, 1 }); Assert.AreEqual(1, response); }
public void BuySellStock8() { var response = BuyAndSellStock.MaxProfit(new int[] { 7, 6, 8, 3, 1 }); Assert.AreEqual(2, response); }