Esempio n. 1
0
        public void BagCountSample()
        {
            var input = new[]
            {
                "shiny gold bags contain 2 dark red bags.",
                "dark red bags contain 2 dark orange bags.",
                "dark orange bags contain 2 dark yellow bags.",
                "dark yellow bags contain 2 dark green bags.",
                "dark green bags contain 2 dark blue bags.",
                "dark blue bags contain 2 dark violet bags.",
                "dark violet bags contain no other bags."
            };

            var result = _day07.CountOfBagsNeeded(input);

            Assert.AreEqual(126, result);
        }