Advent of Code 2015 puzzle 07 (7 of 150) [Java]

preview_player
Показать описание
Solving puzzle 7 of 2015. Build a complete circuit with logic gates

I have taken the challenge to complete all of the Advent of Code puzzles (2015 - 2019) before Advent of Code 2020 starts. This is AoC 2015 puzzle 07.

Рекомендации по теме
Комментарии
Автор

This problem was way above my expertise, I asked Ai for help and it directed me to the right direction but i still could not carry out the operations but this video helped alot thanks for information.
ChatGPT said that: first we will have to sort the string lines into a logical order using topological sort for which first we make a dependancy tree then we organize the lines in order, after that, we carry out the intructions by tokenizing each line and doing the operation while keeping trck of each variable. In Short, this problem was way more of a road block then previous ones.

reconmaster
Автор

I feel like this one was a significant jump in difficulty compared to the previous puzzle. At first I thought you could just evaluate each expression eagerly as you read in each line and that they wouldn't mention any wires that hadn't been initialized with a constant value already, which works for the example they provide. But then my puzzle input had an and expression between two unknown wires in its first line. I also had a hard time understanding exactly what part 2 meant -- what does "resetting wires" mean? I feel like I didn't handle it very well, but I did manage to solve it. Super fascinating to see how other people tackle the same problem.

warrenhenning