public void TestFifthCase_2() { int[] arr = new int[] { 6, 1, 3, 2, 4, 7 }; var prof = new MaxProfit2(arr); var result = prof.GetMaxProfit2(); Assert.AreEqual(7, result); }
public void TestFourtCase_2() { int[] arr = new int[] { 7, 6, 4, 3, 1 }; var prof = new MaxProfit2(arr); var result = prof.GetMaxProfit2(); Assert.AreEqual(0, result); }
public void TestFirstCase() { int[] arr = null; var prof = new MaxProfit2(arr); var result = prof.GetMaxProfit1(); Assert.AreEqual(0, result); }
public void TestThirdCase_2() { int[] arr = new int[] { 1, 2, 3, 4, 5 }; var prof = new MaxProfit2(arr); var result = prof.GetMaxProfit2(); Assert.AreEqual(4, result); }
public void TestSecondCase_2() { int[] arr = new int[] { 7, 1, 5, 3, 6, 4 }; var prof = new MaxProfit2(arr); var result = prof.GetMaxProfit2(); Assert.AreEqual(7, result); }