Now I am stuck in day 8 part 2. I have read in Red...
# advent-of-code
s
Now I am stuck in day 8 part 2. I have read in Reddit that brute forcing is not the best solution here. But I am not good at math. Can anyone give me more detailed example of LCM or any other method that will be used to get rid of brute force?
Like, a small example of the method on some sample data, not necessarily related to the test-input or input.
And in the beginning, I store nodes in a map. Does this have to be optimized as well?
d
Hey, you can check out this website with an example already in the input. If you change your steps in the "Show steps" dropdown you can find different ways of calculating it and apply what seems to fit to you. https://www.calculatorsoup.com/calculators/math/lcm.php