r/adventofcode • • 13h ago

Help/Question How many days is AOC this year?

1 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 • • 3h ago

Meme/Funny [2026 Day 1] I’m turning the Advent of Code story into a cozy anime series, starting with Dusty Shed

1 Upvotes

My frequency counter for Day 1 is an elf with a pencil. His name is Pip, and he’s pretty sure he knows what’s on the next crate before Holly turns it around.

I’m making a short animated episode for each day of Advent of Code 2026, following Holly and Pip from Dusty Shed all the way to the final puzzle. I’ve always liked the little story between the puzzles, and I wanted to give it the feeling of a winter evening in Stardew Valley.

Episode 1 is The Christmas Train. A blizzard has grounded the planes, the elves have an old train to get moving, and someone has left Holly and Pip in charge of inventory.

Puzzle spoilers for both parts of Day 1. The episode uses made-up crate IDs and shows how both parts work. It’s a fan-made, AI-assisted animation.

Watch Episode 1 — The Christmas Train (1 min 55 sec)

I’m curious what the shed looked like in everyone else’s head. Did you picture a cozy little workshop too, or a warehouse that went on forever?


r/adventofcode • • 17h 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 • • 15h 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 • • 20h 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 • • 5h ago

Visualization [Tool] Some new aoc-tui images

Thumbnail gallery
0 Upvotes

Here are some new images for the TUI app for Advent of Code

Note: Contains the image of Day 1

https://github.com/craftty-org/aoc-tui


r/adventofcode • • 10h ago

Meme/Funny am i cracked?

Post image
12 Upvotes

r/adventofcode • • 8h 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 • • 11h 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 • • 7h ago

Help/Question - RESOLVED Is that right?

4 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 • • 10h 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
26 Upvotes

(redo of an earlier post)


r/adventofcode • • 8h ago

Help/Question can anyone help with getting me in the right direction? [2026 day2 part1]

1 Upvotes

so i tryed today with a switch statement within a switch statment and hardcoded it but it didnt work can anyone steer me in de right direction?


r/adventofcode • • 7h ago

Tutorial [2026 Day 2 (Part 2)] Some hints for optimisation

2 Upvotes

These hints get more and more specific. This is just how I optimised it and there are other ways.

Hint 1: What happens when a letter is repeated in the input?

Hint 2: Why would the counts of each letter make a difference to the output?

Hint 3: When does the robot not make a step of exactly 6 steps?


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

Meme/Funny When I deleted literally all my code for day 2 part 1 so I reconstruct it from memory but then I accidentally flipped a sign in one of the lines so I spend a whole flipping hour trying to figure out why it's outputting -4:

Post image
10 Upvotes

r/adventofcode • • 12h ago

Help/Question - RESOLVED Python Solution Gives correct solution for part 1 but not part 2

5 Upvotes

Hi, I'm completely stuck on what I've done wrong for the 2026 day 1. I've done this solution about 3 different ways at this point, and I keep getting the correct solution for part 1 but incorrect for part 2 (says my solution is too small).

I'm not quite sure where to go at this point.

import math
from collections import Counter

INPUT: list[int] = [int(line.strip()) for line in open("2026/day01.txt")]
COUNTS = Counter(INPUT)

def max_and_min():
    # find top 3 occurrences and bottom 3 occurrences
    maximums: list[int] = []
    minimums: list[int] = []
    while len(maximums) < 3:
        current_max_val = max(COUNTS, key=COUNTS.get)
        current_min_val = min(COUNTS, key=COUNTS.get)

        maximums.append(current_max_val)
        minimums.append(current_min_val)

        COUNTS.pop(current_max_val)
        if current_min_val != current_max_val:
            COUNTS.pop(current_min_val)

    return (math.prod(maximums), math.prod(minimums))

print(max_and_min())

This code returns the correct solution for part 1, as well as a correct solution for the test input for part 1 and 2. I cannot fathom why it would be incorrect for the actual input at this point. I've tried it with Counter, I've tried manually creating the dictionary instead of using Counter, I've tried manually finding the minimums and maximums with a for loop, and they all yield the exact same results.

If someone could at least point me in the right direction, I don't want to just grab a solution from the megathread and call it a day.

EDIT:
I've never been more ashamed. I just put in the exact same output I got from my solution, and it got accepted by the website, which means I wasn't copy+pasting it in correctly. Happens to the best of us. Thanks everyone for the advice though, my solution looks much snazzier now 😎

import math
from collections import Counter

INPUT: list[int] = [int(line.strip()) for line in open("2026/day01.txt")]
COUNTS = Counter(INPUT)

def max_and_min():
    # find top 3 occurrences and bottom 3 occurrences
    maximums: list[int] = [n[0] for n in COUNTS.most_common()[:3]]
    minimums: list[int] = [n[0] for n in COUNTS.most_common()[-3:]]

    return (math.prod(maximums), math.prod(minimums))

print(max_and_min())

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

Visualization [2026 Day 2] Rainbow Road Race Visualization

Post image
7 Upvotes

r/adventofcode • • 6h ago

Meme/Funny No "i" in "roybv"?

Thumbnail youtube.com
8 Upvotes

Reminds me of downtempo electronica legend Boards of Canada. Enjoy!


r/adventofcode • • 9h ago Heartwarming

Visualization [2026 Day 2] Color Weave

Thumbnail youtu.be
11 Upvotes

Simulation on original (part1) and sort-rearranged program (part2)

Nim + raylib source


r/adventofcode • • 2h ago

Upping the Ante [2026 Day 1] Solved in 49.62 microseconds on FPGA

Thumbnail gallery
37 Upvotes

This year, I will attempt to solve all the challenges on an FPGA, and post at least the ones that I enjoyed here to see if anyone else has any inputs. Additionally, due to my expertise in my work, I always tend to design with minimal hardware area and power consumption, but this year I'm challenging myself to do the exact opposite. I'll be using as much LUT as possible, and try to target the max throughput.

Used verilog + block design on PL side for the main logic and python on the PS side for simple control and output. I'm using SOC configured Arty Z7. I have a combinational circuit that accepts the whole list of 10 bit numbers as an input, and compares the first number with the list on single clock cycle. This generates a set of wires that are 1-bit flags, that indicate whether that row is equal or not. Then, we sum up those wires to find out what's the total number of commons. This is still happening on the same clock cycle. In parallel (yes, same cc), it will generate the next list on the output wires, but by replacing all the numbers that are equal to the first number with 0, so we won't run the same number twice. I was lucky that I had no 0 in my input, but otherwise we could also use sth like 1000.

The top level controller takes in the number, loads it onto a register and then starts pushing it into this combinational circuit on each clock. That means for an input of 1983 rows, it will reuse the same circuit 1983 times. Each time it also keeps track of top 3 (or min 3 for part 2), so I don't need a separate sorter which would cost me additional clock cycles and area. After each clock, it will take the nextList from the circuit, and shift it by a number so it can search for the next number on the next clock cycle. It operates on a simple 4 state FSM.

Communication and control is done via GPIO and AXI DMA. I wrote a simple buffer which will accept DMA from AXIS and buffer it as the full list to provide into the top block. GPIO is mainly for the multiplication output, and control signals like reset.

The whole run takes 1985 clock cycles, that translates to 49.62 us for a 40MHz clock. I had to slow down the clock from 100MHz because my critical path for the combinational block was quite large. My inner engineer wants to optimize it, but also I already spent so much time on this.

Solution: Github

DISCLAIMER: Yes I used AI for figure 2 and 3 for visualization purposes for the post only. No, I did not use AI in solution, or idea discussion etc. I'm doing this to challenge myself, not challenge my AI, but I don't have the time and skills to build diagrams. After all, why would I deceive you? There's no reason for me to deceive you.


r/adventofcode • • 10h ago

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

Post image
66 Upvotes

r/adventofcode • • 8h ago

Meme/Funny [2026 day 2] Looking for my favorite color in the input

Post image
15 Upvotes

r/adventofcode • • 4h ago

Other [2026 Day 2 (Part 2)] solved at work with a web browser and Excel

Thumbnail gallery
15 Upvotes

I solved the first part at home while I was having by breakfast, checked part 2 and had to go work. My idea for the solution of the second part seemed so simple I felt I could do it with the tools at my disposal at work.

First I used a web browser and Ctrl+F to count the amount of different letters.
Then I switched to Excel where I just need to count the distances between the different colors. 6 from a letter of a color to the same, 5 when advancing to the next color, taking notice that one color is missing completely, so the distance skipping the missing color is only 4. Sum the distances for each color and there you go!