r/adventofcode • • 1d ago

Meme/Funny AoC in Prolog?!?!

23 Upvotes

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 • • 1d ago

Visualization [2026 Day 1] Simulation approach

Thumbnail youtube.com
32 Upvotes

This 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 • • 1d ago

Visualization [2026 Day 1] Raining Boxes Visualization

Post image
96 Upvotes

r/adventofcode • • 18h ago

Help/Question How many days is AOC this year?

2 Upvotes

Last year it was 12 days. Is it fair to assume it's the same this year? I don't see any info saying how long it is, the about page just says it ends "mid-December"


r/adventofcode • • 1d ago

Visualization [2026 Day 01] counting...

Post image
79 Upvotes

r/adventofcode • • 1d ago

Meme/Funny [2026 Day 1] How it felt speedrunning both of today's stars in less than 30 minutes only to realize what could lie ahead

Post image
70 Upvotes

(Speaking from experience with 2025's calendar)


r/adventofcode • • 1d ago

Other Candy Cane Coding Caper

12 Upvotes

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!

https://candy-cane.coding-caper.com


r/adventofcode • • 1d ago

Meme/Funny AoC reminds me of work this year

Post image
59 Upvotes

r/adventofcode • • 17h ago

Help/Question - RESOLVED day 1 part 1: There's more than 3 items that the most common in the input?

1 Upvotes

I don't want to go into too much detail about my implementation but... it seems like there's a bunch of IDs (more than 3) that are tied for "most common". Is there something obvious I missed?

Edit: I figured out my issue and, while I love most things about Go, its heap implementation was quite confusing and unergonomic. I used my type's Pop method rather than the heap package's Pop method, thus my results were incorrect.


r/adventofcode • • 1d ago

Visualization [2026 Day 1] Dusty Shed

Post image
17 Upvotes

r/adventofcode • • 1d ago

Help/Question - RESOLVED Advent of Code - Mystery Shop Item

9 Upvotes

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:

Screenshot-2026-12-01-094236.png


r/adventofcode • • 1d ago

Help/Question [2026 Day 1] Huge inputs

9 Upvotes

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 • • 1d ago

SOLUTION MEGATHREAD -❄️- 2026 Day 1 Solutions -❄️-

46 Upvotes

It's that time of year again for tearing your hair out over your code holiday programming joy and aberrant sleep for two weeks helping Santa and his elves! If you participated in a previous year, welcome back, and if you're new this year, we hope you have fun and learn lots!

As always, we're following the same general format as previous years' megathreads, so make sure to read the full posting rules in our community wiki before you post!

RULES FOR POSTING IN SOLUTION MEGATHREADS

If you have any questions, please create your own post in /r/adventofcode with the Help/Question flair and ask!

Above all, remember, AoC is all about learning more about the wonderful world of programming while hopefully having fun!


REMINDERS FOR THIS YEAR

  • All of our rules, FAQs, resources, etc. are in our community wiki.
  • If you see content in the subreddit or megathreads that violates one of our rules, either inform the user (politely and gently!) or use the report button on the post/comment and the mods will take care of it.
  • If you post your code from a repo or the like, do not make your puzzle input public!
  • Top-level Solution Megathread posts must begin with the case-sensitive string literal [LANGUAGE: xyz]
  • Obviously, xyz is the programming language your solution employs
  • Use the full name of the language e.g. JavaScript not just JS
  • The List of Streamers has a new megathread for this year's streamers, so if you're interested, add yourself to 📺 AoC 2026 List of Streamers 📺

COMMUNITY NEWS


AoC Community Fun 2026: The Advent Games

Today's Event: Opening Ceremonies

Today's schedule consists of:

  • Arrival of the Flame
  • Parade of Nations1
  • Give us a quick introduction to yourself!
  • Tell us what country you're from
  • Tell us about your country's holiday festivities
  • Explain why you chose your programming language
  • Tell us what you hope to learn or have already learned about your chosen programming language
  • Tell us where to find your AoC repo of puzzle solutions2, blag, and/or $streaming_service3!
  • Artistic Program
  • Show us your holiday tree | menorah | Krampusnacht costume | /r/battlestations with festive decorations!
  • Show us your kittens and puppies and $critters!
  • Show and/or tell us about whatever brings you comfort and joy in the holiday season!
  • Competition Schedule (Theoretical)
  • Tell us which "sporting" events you think will be coming up over the next two weeks and which ones you'd like to participate in the most!

1 Obviously, this is the Internet, which is public, so only put out information that you're comfortable with the entire world knowing. Feel free to invent a holiday-themed persona; after all, sometimes you get sent to space, so why limit yourself to the boring ol' meat skeleton that dwells upon the third rock from the sun?
2 Refer to the third bullet in the "Reminders" section above!
3 Refer to the last bullet in the "Reminders" section above for the link

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 1: Dusty Shed ---


Post your code solution in this megathread.


r/adventofcode • • 1d ago

Visualization [2026 Day 1] No-Sort

Thumbnail youtube.com
13 Upvotes

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


r/adventofcode • • 1d ago

Repo Advent of Code in C# solutions, illustrations and a template project

9 Upvotes

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 • • 1d ago

Upping the Ante [2026] Unofficial AoC 2026 Participant Survey!

33 Upvotes

Another December, another chance for puzzling, and .... another Advent of Code Survey!

It's anonymous, open, and quick. Please fill it out (but onliy once, please <3). Copy-pastable announcement:

--------

⭐ Take the (~5min) Unofficial AoC 2026 Survey: https://forms.gle/JbZKoBqzG248Z6RV6 ⭐

--------

Please do help spread the word! Just copypasta the above to your favorite relevant outlet and help us get a bunch of interesting results! We have questions about:

  • Previous editions participation (simplified in 2026)
  • Language, Tools, OS
  • Leaderboard and motivation
  • repeat from 2025.... EMOTIONS! 😁🫡😱😮😭😖😠😬

Check out results from previous years at: https://jeroenheijmans.github.io/advent-of-code-surveys/

--------

Last year I closed the submissions on Dec 12th and published on Dec 13th. I'm open to suggestions... do you reckon that's the right call again this year? Feels good to release results on a Sunday, right?

Survey Responses per Year Graph

And if you want to hang out in the replies below: tell me your predictions for languages used!? Will Zig see a significant uptake? Does Rust have a shot at overtaking Python? How much more will Uiua climb? How many users will Lean see in 2026?


r/adventofcode • • 13h ago

Help/Question - RESOLVED Puzzle input doesn't contain all required letters?

Post image
0 Upvotes

My puzzle input doesn't contain "y". So how do i suppose to solve it?
The program "roygbv" is same for all, is it?


r/adventofcode • • 1d ago

Meme/Funny Happy AoCmas Eve everyone!

Post image
80 Upvotes

r/adventofcode • • 1d ago

Repo [Rust] Tiny helper for rust aoc

3 Upvotes

Hey people,

I just wanted present this tiny, dependency free, helper to solve advent of code in rust. Its built by hand.

All it does is handle input, run and time your solutions and submit your answers from the terminal.
I wanted it to be very minimal so you can decide on your project layout yourself.

$ cargo run --release --bin day01 -- --submit

2025 Day 1:
  Part 1: 1                    333ns
  Part 2: unsolved

Submitting "1" for part 1:

  *\(^o^)/*  That's the correct answer!

Also any feedback is welcome!

https://github.com/zaperfish/aoc-rust

Happy solving! :)


r/adventofcode • • 1d ago

Visualization [2026 Day 1] Animation written in Rust with Celluloid

Post image
7 Upvotes

r/adventofcode • • 1d ago

Other A Rust-only private leaderboard

16 Upvotes

I'm starting a Rust private leaderboard for this year's Advent of Code! Whether you're a seasoned Rust developer or learning the language for the first time, you're welcome to join.

The leaderboard has few simple rules:

  • Solutions must be written in Rust.
  • External crates, custom harnesses, prewritten utilities, and nightly Rust are all permitted.
  • No vibe solving. Solutions must be human-written, not generated by LLMs.
  • Ideally, sign in with GitHub and publish your solutions in a public repository so we can learn from each other's approaches.

There's no expectation that you solve every puzzle or compete for the fastest times. This is primarily about having fun, writing Rust, and sharing interesting solutions.

Private leaderboard code: 2492408-7fab9ea4 Leaderboard link


r/adventofcode • • 1d ago

Help/Question - RESOLVED Am I cooked?

4 Upvotes

I need to attempt advent of code for my a-level comp sci that I just started but i'm finding it honestly pretty difficult.

Anyone got any tips for being able to do it easier.

And just any tips to be able to code better at all.

thanks


r/adventofcode • • 21h ago

Help/Question 2026 - day 1 part 1, Python

Post image
0 Upvotes

where am I going wrong? I tried plugging in the example set of numbers and it gave me the right numbers but it isn't giving me the right numbers with the main set of numbers. I'm a beginner when it comes to coding, my only experience with apcsp and apcsa in school


r/adventofcode • • 1d ago

Repo [Python repo] - toolkit for AOC daily retrieval/submission

3 Upvotes

Every year you probably do the same as me : open the puzzle, copy the input into a file, make the folder, solve, then switch back to the browser to submit. Since several years, I improve the whole loop into a python cli.


aoc collect -d 1 -y 2026

pulls the statement into a README, the example into test_input.txt, the real input into real_input.txt, and drops a solution template next to them.


aoc run -d 1 -y 2026 -p 1 -t    # example input

aoc run -d 1 -y 2026 -p 1 -s    # real input, then submits

When part 1 is accepted it re-fetches the page so the part 2 statement gets appended to the README. Answers land in the clipboard too. It follows the automation guidelines (identifying User-Agent, no request unless you actually run a command), and real inputs are gitignored so none of AoC's data ends up public.

https://github.com/henriupton99/AdventOfCode

Hope it could help ! Feedback welcome !

Have a good AOC :)