public override long Part2(string input) { parseBags(input); var gold = BagType.GetBagType("shiny gold"); return(countChildren(gold) - 1); }
public override long Part1(string input) { parseBags(input); var gold = BagType.GetBagType("shiny gold"); var possibleParents = new HashSet <BagType>(); addParents(possibleParents, gold); return(possibleParents.Count); }