r/adventofcode • u/dethorhyne • 14h ago
r/adventofcode • u/naclmolecule • 14h ago
Visualization [2026 Day 1 (Part 1 & 2)] [Python] Terminal Visualization
I was too tired to post last night, still adjusting to late night solving... (ᴗ˳ᴗ)💤. Figured I'd help the elves by installing a crane in that dusty ol' shed. As always, code lives here: https://github.com/salt-die/Advent-of-Code/tree/main/2026/aoc_visuals.
r/adventofcode • u/topaz2078 • 8h ago
Other Give help by making test cases!
Hello friends! I just saw this excellent example (see some of the comments on that post) of a great way to give help and answer questions here when people are stuck: come up with simple test cases that demonstrate where the bug is! That way, the person who is stuck still gets a chance to figure out their problem and learn by doing. I know many of you are already great about this, but I figured it would be worth calling out. Happy puzzling! <3
r/adventofcode • u/PatolomaioFalagi • 3h ago
Meme/Funny [2026 Day 02] Richard of York gave battle vain
r/adventofcode • u/123IshaTest • 20h ago
Visualization [2026 Day 1] Simulation approach
youtube.comThis year I trying a completely new approach to Advent of Code: Simulation
Instead of a script that calculates the answer, I create individual objects that interact with each other and converge to a solution. There is no single variable that is counting towards a solution, we just press play and hope for the best!
For day 1, each id gets represented as a colored box that bounces around. When it smashes into a box with the same id, they merge.
The green strip is a sensor that checks the smallest and largest boxes that pass through it.
r/adventofcode • u/SlayLeafSlug • 18h ago
Meme/Funny AoC in Prolog?!?!
I was filling in the unoficcial AoC survey
(⭐ Take the (~5min) Unofficial AoC 2026 Survey: https://forms.gle/JbZKoBqzG248Z6RV6 ⭐)
And I saw this:


Who the hell is out there doing AoC in Prolog😭
r/adventofcode • u/matth_l • 11h ago
Help/Question Joining the big leagues
Anyone else using aoc to learn rust?
I feel genuinely lost, and I love it, it feels like past times (pre ai bs) again, never built anything with a lower level language,
r/adventofcode • u/scadoshi • 14h ago
Help/Question Where do you draw the line between parsing and solving?
For those of you who optimize AoC for runtime rather than time to write the code, where do you draw the line between parsing and solving?
When I measure, I time parsing, part one and part two separately. I often identify work I could do during parsing that would make the solves faster, but usually I just parse into a properly typed owned struct and leave the real work to the parts. Is that how you do it, or do you push as much as you can into parsing? And do you count parsing in your times at all? Or do you just measure entirety of runtime?
Smaller second question: when both parts need the same expensive processing, I've started caching it on my Puzzle struct so part one's work gets reused by part two (image shows this occurring for 2026's day 1 in Rust), instead of a shared function that runs twice. Part one gets a little slower on average but the full run gets a lot faster. Do you do the same, or does each part pay for itself?
I guess I'm just wondering how people measure their solutions overall
r/adventofcode • u/p88h • 22h ago
Visualization [2026 Day 1] No-Sort
youtube.comLeverages 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
r/adventofcode • u/tedchs • 18h ago
Other Candy Cane Coding Caper
For Advent I just launched Candy Cane Coding Caper, a coding adventure inspired by Advent of Code, for kids 8-12. Each day presents an interactive, structured lesson about a simple Python programming concept. I thought this community might like to take a look!
All Python code runs locally in the browser through Pyodide and WASM, and game state is stored locally.
This is brand new and I would love any feedback or questions!
r/adventofcode • u/Both-Touch990 • 3h ago
Meme/Funny [2026 Day 2 Part 2] How it felt getting the star only to realize there's a more efficient way to get the solution
(redo of an earlier post)
r/adventofcode • u/apersonhithere • 3h ago
Visualization [2026 day 2] [python] quick & simple terminal visualization
the robot being represented with a face is because of dwarf fortress
r/adventofcode • u/kscoaster • 19h ago
Help/Question - RESOLVED Advent of Code - Mystery Shop Item
I realize this question runs counter to the whole "mystery" thing, but... Can someone at least confirm if the "mystery tee" on the AoC shop (US) is at least Advent of Code related?
FYI - this is what I'm seeing:
r/adventofcode • u/encse • 21h ago
Repo Advent of Code in C# solutions, illustrations and a template project
Just like in previous years, I plan to continue my illustrated journey in C#.
The website is at https://aoc.csokavar.hu, my repository can be found in https://github.com/encse/adventofcode, with a template extracted to https://github.com/encse/adventofcode-template.
r/adventofcode • u/subspace_mp4 • 1h ago
Meme/Funny [2026 Day 2 (Part 2)] It looked scary for a little while
r/adventofcode • u/daggerdragon • 5h ago
SOLUTION MEGATHREAD -❄️- 2026 Day 2 Solutions -❄️-
THE USUAL REMINDERS
- All of our rules, FAQs, resources, etc. are in our community wiki.
AoC Community Fun 2026: The Advent Games
Today's Event: International Toboggan Championships
"Feel the rhythm, feel the rhyme, get on up, it's
bobsledtoboggan time!"
— Cool Runnings (1993)
Today's schedule possibly consists of:
- Tracking Chute Runs and Team Practice
- Embiggen is a perfectly cromulent word. Do with it as you will.
- Qualifying Runs
- Reverse code golf your solution
- (oblig XKCD)
- Second Runs and Finals
- Why use few word when many word do trick?
- Unnecessarily declare variables for everything and don't re-use variables
- Use unnecessarily expensive functions and calls wherever possible
- Implement redundant error checking everywhere
- Javadocs >_>
Request from the mods: When you include an entry alongside your solution, please label it with [Advent Games] so we can find it easily!
--- Day 2: Fulminating Farmland ---
Post your code solution in this megathread.
- Read the full posting rules in our community wiki before you post!
- State which language(s) your solution uses with
[LANGUAGE: xyz] - Format code blocks using the four-spaces Markdown syntax!
- Quick link to Topaz's
pasteif you need it for longer code blocks. What is Topaz'spastetool?
r/adventofcode • u/fnordargle • 19h ago
Help/Question [2026 Day 1] Huge inputs
Trying to think of algorithms that can solve this for huge inputs, or where many of the assumptions about the input do not hold.
By huge I mean the inputs are large enough that you don't even have enough memory to store counters for every number in the input, let along read the entire input file into memory.
It's like the definition of "Big Data":
* It's not when you can't fit the entire dataset into memory, it's when you can't even fit the index into memory
I like the think about problems like this with increasing levels of restrictions.
With a file with only ~2000 lines we don't have to think about complexity that much, but if the file contained 4,000,000,000 lines we could have the situation where we have three numbers that only appeared once, three numbers that only appeared 3 times, and then 1,999,999,994 numbers that appear twice.
Another assumption that some solutions make is that the frequency count of the numbers that appear in the top and bottom 3 must themselves be relatively unique as 4 numbers that all appear 4 times cannot all be in the top or bottom 3 in a deterministic manner.
To counter this it's trivial to craft an input that has a huge number of lines where even the frequency counts are unique. e.g. Consider the input formed of numbers 1 to n where every number x appears x times. Every item has a unique frequency count but the answer is still deterministic. (And it is similarly trivial to swap 1, 2, 3, n-2, n-1, n with 6 other numbers in the range so the answer isn't obvious up front.)
a) Let's pretend that memory is constrained such that we don't even have enough memory to store counters for all of the unique elements in the input, but we are free to read/write to intermediate local files and that we have enough space to store a bit more than another copy of the original input file.
The standard approach here is to split the input file into n smaller files, making sure that any occurrence of a number always appears in the same file. So for number x we write it to file x mod n every time we encounter it in the input. We choose n such that we can process n individual counters in memory in one go.
Once we've split the input into n sub files we process each one of those in turn in memory using the standard O(n) algorithm and keep track of the top 3 and bottom 3 item counts we've seen as we go.
b) Now let's imagine that we have no extra local storage, can we still do this?
Yes, but it's going to be a lot slower. Instead of splitting the input into n smaller files we just iterate over the main input file n times only processing lines that have x mod n = a as we loop a from 0 to n-1. This has the same effect as above but there's a lot of redundant reading involved as the vast majority of inputs read in each loop will be ignored.
c) Final restriction is what if the input is presented to us as a stream that we can't rewind or replay, and we can't write to any local storage, and we can't keep track of all of the possible values in memory. Possible?
I can't think of anything that guarantees getting the right answer without making some assumptions about the input.
r/adventofcode • u/PhysPhD • 1h ago
Visualization [2026 Day 02] Rainbow Road Visualisation
r/adventofcode • u/flwyd • 2h ago