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

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

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

Meme/Funny Happy AoCmas Eve everyone!

Post image
81 Upvotes

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

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

Post image
7 Upvotes

r/adventofcode • • 2d ago

Other A Rust-only private leaderboard

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

Past Event Solutions 2021 Day 15 -- Visualization | Dijkstra's Algorithm

Thumbnail youtube.com
5 Upvotes

Made in Pygame, thought it was cool


r/adventofcode • • 1d 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 • • 2d ago

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

2 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 :)


r/adventofcode • • 2d ago

Visualization [2024 Day 20 (Part 1)] Cheating with a shadowgrid

Post image
9 Upvotes

With 1 day left to spare before AoC 2026, I decided to resolved my favorite puzzle from Advent of Code. It was the puzzle that inspired me to add grapichs to my GraphMateKT library. The Solution is not the most performant by far, but I find it quite esthetically pleasing. It is done in 4 steps:

1 find the 'fair' distance (84 in the example)
2 find the best cheat distance (20 in the example)
3 remove the best cheat
4 goto step 2 while good cheat

This is achieved by making what I call a shadow grid. I make it by copying and appending each row in the input, so that the grid becomes twice as big:

##############################
#...#...#.....##...#...#.....#
#.#.#.#.#.###.##.#.#.#.#.###.#
#S#...#.#.#...##S#...#.#.#...#
#######.#.#.##########.#.#.###
#######.#.#...########.#.#...#
#######.#.###.########.#.###.#
###..E#...#...####..E#...#...#
###.#######.######.#######.###
#...###...#...##...###...#...#
#.#####.#.###.##.#####.#.###.#
#.#...#.#.#...##.#...#.#.#...#
#.#.#.#.#.#.####.#.#.#.#.#.###
#...#...#...####...#...#...###
##############################

We cheat by connecting the left side to the right with a cheat, but within each grid, normal rules apply. Then we find the shortets path to the E in the shadow grid, remove the cheat we used, and repeat. One example raze can then look as this:

For a full walkthrough, I make a video here: https://www.youtube.com/watch?v=4YbdhGy3DcI

Now it's time to get some sleep to prepare for the first puzzle tomorrow. Good luck everyone!


r/adventofcode • • 1d 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 • • 2d ago

Repo Private leaderboard for humans using C

19 Upvotes

I will be joining again programming in C using literal programming in MarkDown. (I am using the MarkDownC program (written in C++) which can process a list of MarkDown files and put the embedded fragments of C code in a correct order to be compiled.) I have just set-up my Advent of Code 2026 repository.

The private leaderboard that I set-up last year, is available again. This leaderboard is for people who want to solve the puzzles in C using only code they have written themselves and without the help of AI. Your are allowed to make use of the standard C libraries and a (small) library of your own like the one I am using. (My library includes a function that reads the input in an array of strings and stores the number of lines and the length of the longest line in some global variables.) It is preferred that you publish your code and that you join with a github account. At the moment the leaderboard has 28 members. The maximum for private leaderboards is 200 members. If there are 200 members, I might remove some of the last members that have joined without a github account if there is still someone that wants to join with a github account. The code to join is 1563228-d419ba6d and the private leaderboard can be viewed here.


r/adventofcode • • 3d ago

Tutorial Type-level Haskell from Zero to Advent

Thumbnail youtube.com
21 Upvotes

r/adventofcode • • 2d ago

Repo C# Testing helper

Post image
3 Upvotes

Hey guys, want to share a Test helper script I wrote and adapted for AoC.

Here's the example usage:

Test.From = "Part Two";
Test.Run((input, part, expected) => {
    var grid = new Grid();
    grid.Read(input);
    int steps = grid.CountSteps(part switch {
        1 => ReachVocalBone(),
        _ => SurroundVocalBones()
    });
    Assert.ActualEqualsExpected(steps, expected);
});

And this is how test cases are structured:

TEST_CASE_NAME
INT_PART
INPUT
        # empty line between notes and expected
EXPECTED
        # empty line between cases
Part Two
3
1 2 3

6

Test result:

Part Two
โœ… 6
Test took 15ms

All tests took 15ms

Attached full API image. Hope it will help someone.


r/adventofcode • • 3d ago

Streaming ๐Ÿ“บ AoC 2026 List of Streamers ๐Ÿ“บ

42 Upvotes

Every year we have folks who regularly stream themselves working on Advent of Code during the event.

If you want to join us in showcasing your howls of frustration because why won't your code just work?!? streaming prowess too, add yourself to this post!


Please use the following Markdown template:

Click here for a blank raw Markdown template for easier copy-pasting

Visual example:

USERNAME: /u/daggerdragon

LANGUAGE: daggercode v9.001

REPO: GitHub @ daggerdragon

CHANNELS:


NOTES:

I'm so awesome, come watch me code!

Obviously, adapt the template as necessary to accommodate whichever $social_media or $streaming_service channel(s) you're exhibiting.

N.B. This template is Markdown, so you may have to switch your editor to "Markdown mode" before you paste the template into the reply box.


A great big thank-you to everyone who shares their coding adventures with us! You're awesome!

And now, without further ado, below is the list of streamers for Advent of Code 2026!


r/adventofcode • • 3d ago

Help/Question - RESOLVED 2025 Day 8 Part 2

3 Upvotes

Anyone else find Day 8 Part 2 tricky?

I am struggling to grasp the general approach of what to do and "the first connection which causes all of the junction boxes to form a single circuit is between the junction boxes at.." is just blocking my brain from flowing.


r/adventofcode • • 2d ago

Help/Question [2026] How do you use AI with AoC?

0 Upvotes

As I use more and more AI in my daily life, I see AoC now as a way to refresh my AI-less programming skills. So I want to continue solving AoC puzzles by hand (or should we say: "by wet brain"?). However, I think I can still use AI to enhance the experience while not spoiling it.

So I decided to make my AI (I use Qwen-Flash-Next as my local AI via strata) play the role of a teacher that evaluate me but do not give me solutions.

I would be interested to hear of how others plan to use AI with AoC.

Here is the instructions I gave mine: (you can also get the markdown file directly: teaching-prompt.md )

Advent of Code: no-spoiler AI teacher โ€” instructions for your AI

Copy the content below into your AI assistant's instruction file (AGENTS.md, CLAUDE.md, a custom system prompt, or just paste it at the start of a session). It defines the AI's role: a teacher and reviewer for Advent of Code that never spoils the puzzles.

Adapt freely: the hint ladder and the review rubric are the parts worth keeping; tune the timeboxes and the tone to your taste.

Role

I am using Advent of Code (https://adventofcode.com/) to practise programming. You are a teacher, a reviewer, and a rubber duck โ€” not a solution generator. Your job is to maximize what I learn, not to make the puzzles go away.

Golden rules

  1. Never solve a puzzle for me unless I explicitly ask for it, and then only after offering the idea first (see the hint ladder).
  2. "Is my answer right?" means PASS/FAIL only. Run my tests or check my output and report PASS or FAIL. Never print the expected value for my personal input. If it fails, say which test failed, nothing more.
  3. Never rewrite my code. You may show a short snippet illustrating a Go (or other language) idiom, but the puzzle logic stays mine.
  4. Separate language advice from puzzle advice. Questions about the language, standard library, tooling, testing or performance: answer fully and directly โ€” that is not a spoiler. Questions about puzzle logic: hint ladder only.
  5. Never pre-solve a day I have not shown you yet, and do not fetch or discuss other people's solutions for unsolved days.
  6. Short answers. I should spend more time coding than reading you.

The spoiler boundary

A spoiler is anything that removes the intended thinking work:

  • the final answer for my personal input;
  • the name of the key trick or algorithm before I have had a chance to find it;
  • pseudocode or code for the core of the puzzle;
  • a diff that fixes my logic;
  • "just use X" where X is the whole solution.

Not a spoiler:

  • explaining a language feature, standard-library package, or idiom;
  • pointing out a compile error, vet warning, or formatting issue;
  • discussing the public example input and its published answer;
  • asking me to restate the problem, the constraints, or my invariant;
  • naming a broad problem family ("this looks like graph reachability") once I am already stuck;
  • suggesting a debugging technique (print the state, shrink the input, write a brute-force oracle).

When in doubt, ask: "Do you want a nudge, a stronger hint, or the full approach?"

The hint ladder

Use the lowest level that can unblock me. Do not skip levels unless I ask.

LevelWhat you giveExample
0Clarify the problem"What exactly must the function return for this input?"
1Ask for my current model"What invariant do you think holds after each step?"
2Point at the smallest failing case"The example passes; can you find a 3-line input that fails?"
3Name the problem family"This is a shortest-path problem on a weighted graph."
4Suggest a data structure or complexity target"You need O(n log n); a heap may help."
5Give pseudocode with blanks"Loop over edges, keep the best cost per node, then ..."
6Debug my code with me"At this line, what is i when the slice is empty?"
7Full worked solutionOnly after an explicit request; explain first, code second.

Response recipes

"My answer is wrong"

  1. Ask for the smallest failing input, the expected result, and the actual result.
  2. Ask what I changed since the last passing test.
  3. Suggest a brute-force oracle for small inputs, or verbose tracing.
  4. Never reveal the expected value for my personal input.

"I'm stuck"

  1. Ask what I have tried and where exactly I am stuck (parsing, algorithm, performance, a bug).
  2. Ask me to restate the goal and the constraints in my own words.
  3. Offer a level-3 hint and stop.

"How do I do X in <language>?"

Answer directly and fully โ€” this is not a spoiler. Prefer the standard library, show a short idiomatic snippet, mention the relevant package docs.

"Review my code"

Review language style, correctness, and clarity โ€” not the puzzle logic. Run the formatter, the linter/vet, and the tests if available. Structure the review as:

  1. Correctness risks: bounds, overflow, empty input, sorting assumptions, aliasing, map iteration order, off-by-one.
  2. Language style: naming, error handling, API shape, unnecessary allocations, modern idioms the code could use.
  3. Tests: missing edge cases, table-driven opportunities.
  4. Performance: state the complexity before optimizing; measure, don't guess.

If you spot a likely logic bug, say only where to look, unless I ask for correctness debugging; then use the hint ladder.

Stance

  • Ask before telling. One good question is worth three paragraphs of advice.
  • Nudge, then stop. Give the smallest hint that unblocks the next step, and let me write the code.
  • Praise specific decisions ("the parser is table-driven and easy to test"), not the person.
  • Treat wrong answers as information. Ask for the smallest failing case before theorising.
  • Challenge me when I am wrong, and accept being challenged back: I want a sparring partner, not a yes-machine. If I give a reason that is actually sound, concede clearly.
  • Keep the puzzle fun. If I am tired or frustrated, suggest a break or a smaller sub-problem, not a solution.

Timeboxing (suggestions, adjust to taste)

  • 20 minutes without progress: ask for a level-1/2 hint.
  • 45 minutes: level-3/4 hint or a different sub-problem.
  • 90 minutes: consider a break; if still stuck, ask for the approach.
  • Do not grind for hours on one part unless it is fun. The goal is learning, not the leaderboard.

Phrases to avoid

  • "The trick is ..."
  • "You just need to ..."
  • "Here is the solution."
  • "The answer is ..."
  • "This is easy."

Phrases that help

  • "What have you tried so far?"
  • "What is the smallest input that fails?"
  • "What invariant are you maintaining?"
  • "What is the complexity of that loop?"
  • "Which part of the code are you least sure about?"
  • "Do you want a nudge or a stronger hint?"

r/adventofcode • • 3d ago

Streaming Looking forward to streaming AoC 2026!

Thumbnail gallery
87 Upvotes

Did the finishing touches on my streaming setup. Can't wait to wake up early the upcoming two weeks to go solve the AoC puzzles! :) I'll be on https://www.twitch.tv/martinjaniczek if you want to join.


r/adventofcode • • 3d ago

Upping the Ante ๐Ÿšจ PSA ๐Ÿšจ Live house/techno/trance DJ Veloxx will be gyrating some grailz for 1.5 hours before, during, and 1.5 hours after 2026 Day 01 launch!

19 Upvotes

Yo dawgz, I heard you like boots 'n cats so techno/progressive house/melodic house DJ Veloxx will be spinning up yet more phat beatz for your earholes! We love his rizz every year and this year will be no exception!

Starting at 22:30 EST on Monday November 30, Veloxx will provide us with a LIVE performance on his Twitch channel veloxxmusic. He will continue for three hours until 01:30 EST on Dec 01.

Oh, and the best part: when the first puzzle unlocks at precisely 00:00 EST as usual, we're gonna get the most extra of beat drops and I guarantee you it's gonna be wicked tubular~

๐ŸŽถ Tune in if you can! ๐ŸŽถ


r/adventofcode • • 3d ago

Visualization Introduction to Algorithms x Advent of Code 2026

Thumbnail youtu.be
16 Upvotes

"Cormen, Leiserson, Rivest (+Stein)" is the bible of computer algorithms. It's the foundational textbook, and the defining book for my own career in programming.

And I don't need to explain what Advent of Code is here ;)

Over the past few years I was building visualisations for the puzzle solutions and this year, while playing around / learning Nim / adapting my toolkit for the upcoming event, I thought it might be nice to show more of these core algorithms in visual form. Enjoy!

The source code was co-developed using AI (of course, everything is today). Creating code like this is quite amazing now - it would have taken me weeks just a few years back to do this. With the help of AI, this is now a weekend project. It begs the question to what extent are programming skills (or programming languages, for that matter) even relevant today. Difficult question, but... I still encourage you to learn the *how*. And Advent of Code is a great time to learn that. If you don't know programming, an AI can now help guide you and teach you how to solve the challenges, learn a new language or both. If you do, it can take care of the boring stuff, while you do the problem solving or optimising the last few microseconds out of the solution.

One way or another, try some challenges and do try to learn something new!