r/adventofcode • • 9h 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 • • 10h ago

Other [2026] Doing AoC without AI this year, and built a tool to keep myself honest

Thumbnail humanmode.dev
0 Upvotes

At work AI is writing all of my code now and I have noticed that I am no longer enjoying coding as much as i used to. So this year I am doing AoC with no AI, meaning no AI inline suggestions and no AI implementation. I may still talk to AI to understand a problem when I am stuck, but it does not write any code.

To help myself stick to it I built a VS Code extension that tracks what I type versus what gets inserted. Day 1 above: 17 minute session, 21 lines by hand, 0 AI inserts. The extension can't catch retyping code from somewhere else, so it is a commitment device, not an anti-cheat.

It's free if anyone wants to join: humanmode.dev. Disclosure: it is my project.

Anyone else doing a no-AI run this year?


r/adventofcode • • 6h 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 • • 10h ago

Help/Question - RESOLVED [2026] Private Leaderboard Score Bug

Post image
0 Upvotes

I have a private leaderboard and the scores appear to be wrong. Since it is still the first day, the maximum number of stars should be 2, however it is showing that I have 18 and another person has 16.

I am not sure exactly what is causing it, however it appears to increment by 2 stars every time I view the Day 1 problem after it has been solved.

Is anyone else experiencing this? Or is this expected behavior that I am missing?


r/adventofcode • • 13h ago

Other [2026] Advent of SQL & NoSQL: 24 Christmas puzzles across 4 different databases (SQLite, DuckDB, PostgreSQL, MongoDB)

Post image
0 Upvotes

Happy Holidays, r/adventofcode!

I wanted to share a little project I've been working on: Advent of SQL & NoSQL, an Advent-style challenge for people who enjoy solving puzzles using database queries.

Somebody tampered with Santa's Nice List, and you're the North Pole's first-ever data elf.

There are 24 puzzles, one a day from December 1 to 24, with each puzzle revealing another part of the mystery.

What makes this different is that you can solve the entire story using any of four databases:

  • SQLite
  • DuckDB
  • PostgreSQL
  • MongoDB

It was originally supposed to be SQL-only, but after roughly a year of working on VisuaLeaf, I managed to build an embeddable, MongoDB-compatible database that runs entirely in the browser. This allowed me to include NoSQL challenges as well!

Some features:

  • Everything runs entirely in your browser.
  • Solutions are validated against both visible and hidden datasets.
  • Puzzles gradually increase in difficulty, from basic filtering and joins to recursive CTEs, window functions and advanced aggregation pipelines.
  • Each day includes hints, common pitfalls and database-specific tips.
  • The same mystery can be solved using different database technologies.

If you're interested in solving some Christmas puzzles using SQL or NoSQL alongside Advent of Code, you can check it out here:

https://visualeaf.com/advent-of-sql-and-nosql/

Completely free. No account, no installation, no database server needed.

I hope you all enjoy it, and happy holidays!


r/adventofcode • • 18h 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 • • 5h 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 • • 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

Post image
11 Upvotes

(redo of an earlier post)


r/adventofcode • • 18h ago

Meme/Funny AoC in Prolog?!?!

20 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 • • 59m ago

Help/Question Is that right?

2 Upvotes

My code produces the correct answer for the example case as well as the input string, but it gets marked as incorrect upon submission


r/adventofcode • • 22h 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 • • 1h 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 • • 3h ago

Meme/Funny am i cracked?

Post image
9 Upvotes

r/adventofcode • • 18h 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 • • 2h ago

Meme/Funny [2026 day 2] I expected something else for part 2

Post image
4 Upvotes

This is by no means meant to criticize Eric Wastl who still does a great job by the way, I just found it funny


r/adventofcode • • 11h ago

Help/Question Joining the big leagues

18 Upvotes

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 • • 14h ago

Help/Question Where do you draw the line between parsing and solving?

Post image
18 Upvotes

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 • • 19h ago

Help/Question [2026 Day 1] Huge inputs

8 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 • • 21h 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 • • 20h 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 • • 3h ago

Meme/Funny [2026 Day 02] Richard of York gave battle vain

Post image
35 Upvotes

r/adventofcode • • 14h ago

Visualization [2026 Day 01] 3d render

Post image
32 Upvotes

r/adventofcode • • 3h ago

Meme/Funny [2026 Day 02] I see a pattern...

Post image
41 Upvotes

r/adventofcode • • 8h ago

Other Give help by making test cases!

46 Upvotes

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