public void TestSolution(int[] coins, int amount, int expectedResult) { var soln = new CoinChangeProblem(); var result = soln.CoinChange(coins, amount); Assert.Equal(expectedResult, result); }
public void TestMakeChange3() { int[] coins = { 1, 5, 10, 21, 25 }; Assert.That(CoinChangeProblem.MakeChange3(coins, 5), Is.EqualTo(1)); Assert.That(CoinChangeProblem.MakeChange3(coins, 6), Is.EqualTo(2)); Assert.That(CoinChangeProblem.MakeChange3(coins, 63), Is.EqualTo(3)); }
public void TestCoinChange() { int[] coins = { 1, 3, 4 }; int amount = 6; int result = CoinChangeProblem.MinCoins(coins, amount); Console.WriteLine(result); //Console.ReadLine(); }
public void CoinChangeProblem_Test() { // Arrange var denominations = new int[] { 1, 2, 3 }; var amount = 10; // Act var noOfWays = CoinChangeProblem.GetNoOfWaysToReturnChange(denominations, amount); // Assert }
private static void PrampCases() { int option = 2; switch (option) { case 1: DiffBetweenTwoStrings.Tests(); break; case 2: CoinChangeProblem.Tests(); break; case 3: MaxHeapClass.Tests(); break; default: break; } }