I just completed day 5, and I realized that day 5 input was one of the hardest inputs that you can have to parse and read in the challenges.. especially the column things in the beginning...🥴
🙌 1
c
Charles Flynn
12/08/2022, 11:09 PM
I only realised afterwards that as the input wasn’t all that big I could have easily just hardcoded it…
f
Fredrik Rødland
12/09/2022, 12:30 AM
yeah. I split it in two files and parsed each seperatly
k
Kiet
12/09/2022, 4:03 AM
It's actually not that bad once u realize that the letters are evenly spaced by 3 characters.
j
Jakub Gwóźdź
12/09/2022, 4:53 AM
@Kiet by 4 chars but yes 🙂
a
AbolfaZl RezaEi
12/09/2022, 9:39 AM
@Fredrik Rødland I tested several ways to read them, and all of them had a problem in one of the steps. in the end, I used regex with some if and foreach. if you wanna give a performance score to my code, maybe it isn't good at all 😂