示例#1
0
        public static int Part2()
        {
            const string path = Helpers.inputPath + @"\day07\input.txt";
            IList <(string, IList <(string, int)>)> inputs = ProcessInputFile(path);
            BagTree bagTree = new BagTree(inputs);

            return(bagTree.TotalBags("shiny gold") - 1);
        }
示例#2
0
        //######################################################################
        // Part 1 + 2 Solutions
        //######################################################################

        public static int Part1()
        {
            const string path = Helpers.inputPath + @"\day07\input.txt";
            IList <(string, IList <(string, int)>)> inputs = ProcessInputFile(path);
            BagTree bagTree = new BagTree(inputs);

            return(bagTree.BagsContaining("shiny gold").Count);
        }