Advent of Code 2024 - Day 6

https://adventofcode.com

This is a thread to discuss Day 6 :slight_smile:

https://adventofcode.com/2024/day/6

REMEMBER!
It is VERY important NOT to write any public spoilers :slight_smile:
ALWAYS keep spoiler stuff hidden inside one of these

Summary

This text will be hidden

which you can obtain by clicking on the gear icon

image

Good luck :slight_smile:
FYI one of the features of Advent of Code is that we all get given different inputs so our answers will be different.
The examples are all the same but each of us gets different inputs for us to solve

Part 1 done
And now Part 2 done after someone giving me a hint to make it run in less than a day

Hint

The O only has to be placed in the places that were visited by the guard in Part 1 (but not in starting position)

https://snap.berkeley.edu/snap/snap.html#present:Username=cymplecy&ProjectName=aoc2024_06&editMode

advent of code 2024 script pic(2)
ok done with p1 but snap keeps crashing with big text strings and throwing canvas.2d errors or something...

I really dont understand part 2 at all

That's why I prefer to use a block to get the contents of the clipboard, because it only passes the string into the variable, it doesn't have to render it.

yeah, I usually import a .txt file.