Beispiel #1
0
        public void CoinChangeShouldWork3()
        {
            var coins = new int[] { 1, 5, 10, 25 };

            var result = MakeChange.FindChanges(coins, 15);

            Assert.Equal(result, 6);
        }
Beispiel #2
0
        public void CoinChangeShouldWork2()
        {
            var coins = new int[] { 2, 5, 3, 6 };

            var result = MakeChange.FindChanges(coins, 10);

            Assert.Equal(result, 5);
        }
Beispiel #3
0
        public void CoinChangeShouldWork()
        {
            var coins = new int[] { 1, 2, 3 };

            var result = MakeChange.FindChanges(coins, 4);

            Assert.Equal(result, 4);
        }
Beispiel #4
0
        public void TestMakechange1()

        {
            Assert.AreEqual(4, MakeChange.Makechange(135));
        }
Beispiel #5
0
 public void TestMakechange6()
 {
     Assert.AreEqual(1, MakeChange.Makechange(1));
 }
Beispiel #6
0
 public void TestMakechange5()
 {
     Assert.AreEqual(5, MakeChange.Makechange(14));
 }
Beispiel #7
0
 public void TestMakechange4()
 {
     Assert.AreEqual(0, MakeChange.Makechange(0));
 }
Beispiel #8
0
 public void TestMakechange3()
 {
     Assert.AreEqual(3, MakeChange.Makechange(121));
 }
Beispiel #9
0
 public void TestMakechange2()
 {
     Assert.AreEqual(2, MakeChange.Makechange(120));
 }