public void MaxProfitOnePass_Returns_ExpectedResults(int[] prices, int expected) { var actual = BestTimeToBuyAndSellStock2.MaxProfitOnePass(prices); Assert.AreEqual(expected, actual); }
public void MaxProfitPeakValleyApproach_Returns_ExpectedResults(int[] prices, int expected) { var actual = BestTimeToBuyAndSellStock2.MaxProfitPeakValleyApproach(prices); Assert.AreEqual(expected, actual); }
public int MaxProfitPeakValleyApproach() => BestTimeToBuyAndSellStock2.MaxProfitPeakValleyApproach(Prices);
public int MaxProfitOnePass() => BestTimeToBuyAndSellStock2.MaxProfitOnePass(Prices);
public int MaxProfitBruteForce() => BestTimeToBuyAndSellStock2.MaxProfitBruteForce(Prices);