public void TestFindMaxCoins()
 {
     int[,] input = new int[, ] {
         { 0, 3, 1, 1 },
         { 2, 0, 0, 4 },
         { 1, 5, 3, 1 },
     };
     Assert.AreEqual(12, Problem122.FindMaxCoins(input));
 }
Beispiel #2
0
        public static void ReturnAnotherExample()
        {
            var chains             = Problem122.GetAdditiveChains(154);
            var chains154          = chains[154];
            var minimumChainLength = chains154
                                     .Select(chain => chain.Length - 1)
                                     .Min();

            Assert.AreEqual(9, minimumChainLength);
        }
Beispiel #3
0
        public static void ReturnsSolution()
        {
            var solution = Problem122.Solution();

            Assert.AreEqual(1582, solution);
        }