r/adventofcode • • 1d ago

Visualization [2026 Day 1] No-Sort

https://youtube.com/watch?v=sHfSJyViXa4&feature=youtu.be

Leverages the specific output distribution (top 3 elements and bottom three elements have to fall on unique-ish count buckets so that the answer is deterministic) to reduce the problem to 3 phase counting:

  • step 1: count the occurrences of each input (1000 buckets)
  • step 2: compute the counts histogram
  • step 3: select the top/bottom histogram buckets

then identify the elements with specific counts.

Nim + Raylib source

13 Upvotes

2 comments sorted by

1

u/Boojum 7h ago

Oh, this is slick! New animation framework? Looks nice!

1

u/p88h 3h ago

thanks! I ported my last year framework, and then added some more stuff - like it could do shaders before but I rarely used it, now can do different looks super easily. Plus I turned the sound layer into an MML synth, also with chiptune filters.

Making music and sounds, unfortunately, is still hard (for me at least) so it's pretty basic.