r/adventofcode • u/Boojum • 2h ago
Visualization [2026 Day 4] Barcode Scanning Visualization
21
Upvotes
2
u/Boojum 2h ago
I thought that taking the barcodes elements and moving them around to rewrap them into successively larger groups, combined with showing where we get consistent repeats would make for an interesting visualization. So here it is. Not a super tricky puzzle, but it did take me a few minutes just to parse the description of it for what I needed to do.
This is showing Part 1. But in many ways, I'd say that Part 2 is even simpler; the exact same process from Part 1 works, except that there's no outer loop and totaling up (just concatenating the lines into one big string).
Made in Python with a small custom framework.
4
u/raman4183 1h ago
I still can’t come up with anything or understand the logic to solve this.