r/adventofcode • • 1h ago

Repo rustmas: Rust CLI to fetch, solve, validate and submit AoC from the terminal

0 Upvotes

Ahead of Tuesday: rustmas fetches your input, runs your Rust solution, checks the answer against Fredrik Fornwall's solver, and submits only if they agree. Inputs stay out of git, and main ships with no solutions.

github.com/scadoshi/rustmas

Thanks to Eric Wastl for Advent of Code.


r/adventofcode • • 2h ago

Other Oceania leaderboard 2026

8 Upvotes

I don't know if I'm breaking any rules here. If I am, I'll surely find out soon. Since this year's AOC is just around the corner, I thought it would be sweet to be on a leaderboard for the Oceania timezones. And because I couldn't find any, I just created my own and am letting people here know in case they'd like to join.

So, obviously, none of this can be enforced, and if you're in the US and using AI, more power to you, but I was hoping that this leaderboard be joined by people who:

  • live in Oceania (AU/NZ/etc.)
  • will not be using AI

In case something like this exists, let me know, and I'll delete mine.

I have a hunch that posting the invite code would be frowned upon, so if you're interested, send me a DM or comment below.


r/adventofcode • • 4h ago

Upping the Ante An online wrapper for your private leaderboards, no plugins needed

Post image
6 Upvotes

Since the 2025 event, Eric has made it possible to share private leaderboards via a read-only link. This means you can use a leaderboard wrapper on the fly, without installing any additional plugins or sharing your session cookie. You can also revoke the wrapper's access to your data at any time by resetting the read-only link.

I put together such a wrapper in 2025 and have now given it a bit of a refresh. It adds extra rankings based on solving times, head-to-head comparisons between players and a handful of additional stats. The wrapper also respects the 15-minute caching interval requested by Eric.

All you need to do is use the following URL:

https://everybody.codes/advent-of-code/EVENT/LEADERBOARD_ID/READ_KEY

For example:

https://everybody.codes/advent-of-code/2025/5117781/484117df

It might not be the prettiest thing out there, but I think it does the job quite nicely. Have fun, everyone! :)


r/adventofcode • • 13h ago

Help/Question - RESOLVED Is advent of code good to improve my python programming skills?

27 Upvotes

I don't have that much advance knowledge about data structures and algorithm. I've mostly used python for basic scripting purpose. Can I still attempt past advent of code problems to improve my python programming skills?


r/adventofcode • • 14h ago

Other [2025] Does it still count?

Post image
18 Upvotes

I committed to solve every exercise in two languages (Python and C), without any library (other than the standard library) and without looking up any information other than about the languages themselves (including their syntax and standard library).


r/adventofcode • • 15h ago

Visualization [Tool] aoc-tui: Advent of Code TUI

Thumbnail gallery
34 Upvotes

Hello r/adventofcode,

First of all thank you for such a good platform. Hats off to the developers who made Advent of Code possible.

I built a terminal UI (TUI) for Advent of Code called aoc-tui, written in Rust and using ratatui. I had made one in bash earlier but I faced some issues with the session token stuff. So this time I rewrote it from scratch in Rust and now it has more features.

Main features:

  1. View AOC puzzles (Present and past) (Session token not required)
  2. Solve and Submit the puzzles (Session token required for submission)
  3. Choose your programming language of choice via a config file (Also add it's run command).
  4. Star progress view

WIP

  1. Leaderboard
  2. Animations (Using tachyonfx)

Repo: https://github.com/craftty-org/aoc-tui Install: cargo install --git https://github.com/craftty-org/aoc-tui


r/adventofcode • • 1d ago

Repo I made a template repo for working in Dart

7 Upvotes

Repo Here

I've done my advents mostly in dart so far and have made tools to support that. I have now taken those tools and put them in a template repo for others to use if they want to try Dart.

Some things the repo does

  • Cleans up input files to standardize line endings and remove trailing newlines
  • Has day solution and test templates to start from
  • Benchmarking scripts to time your solutions
  • Fetches your specific input
  • Caches wrong answers to keep you from re-submitting the same wrong answer
  • Examples for utility methods and Dart extensions

If anyone ends up using it, let me know what you liked or if there are any ideas you have for improving it!


r/adventofcode • • 1d ago

Repo [C#] [.NET] AoCHelper library and templates

5 Upvotes

Hi Advent of Code lovers!

It's that time of the year again, and I'm back with some shameless self-promotion of my simple C#/.NET template/library.

No fancy, automated input download or submission here.
As usual, tweak them, wrap them and/or use them as inspiration for your own solutions!

And some unsolicited advice for newcomers: feel free to drop your favorite LLM companions end enjoy Eric puzzles AI-free, as they are intended to be solved. Have fun, learn stuff, exercise your brain and stay hydrated!


r/adventofcode • • 1d ago

Past Event Solutions [All years, all days] "In Review" discussion archive

35 Upvotes

Archive.

In 2026 musifter undertook the enormous effort of recapping all 262 previous puzzles, one post per day. Each post had lively discussion sharing tips & tricks, complementing the original solution megathreads.

Much of this was lost when the account ran into trouble. To preserve it for posterity, this repo archives the posts and comments in markdown format, with links both to the original Reddit thread and the Arctic Shift archive.


r/adventofcode • • 1d ago Bravo

Tutorial 524 Stars: A Categorization and Mega-Guide

55 Upvotes

I'm making a list,
And checking it twice;
Gonna tell you which problems are naughty and nice.
Advent of Code is coming to town.

 

Hi! Once more it's time for my annual update to my categorization and guide to all of the past problems, just ahead of the next event.

As usual, I have two purposes here. Firstly, to help you find some good problems to practice on, if you're looking for particular difficulties or particular types of problems. And secondly, to provide a handy reference to help jog your memory of the various past problems if you've already done a bunch.

But first, I'd like to raise a virtual toast to /u/musifter, whom I think would certainly qualify as an honorary Elvish Senior Historian for the monumental daily "In Review" series posted here over the course of the last year! I had hoped to include links to those threads in my tables below, but alas they seem to have mostly been memory-holed by Reddit.

Wishing you a fun AoC 2026!
- Boojum

 

New This Year

I have changed up how I estimate times and difficulty. With the global leaderboard gone, I'm now relying on aggregated and anonymized data which actually provides even more data. I spent a lot of time studying it to see if I could estimate the size of each year's cohort of main problem solvers and normalize times for the shifting AoC community or use a higher star completion threshold. In the end, I actually opted to rank puzzles simply by the aggregated average of the first ten Part Two solves in the data. This is both more immune to the smaller population in the earlier years, and reflects puzzles that are resistant even to those cheating with LLMs in the modern era. (However, for determining the quickest puzzles, I have chosen instead to use an estimate of the time to the 2500th Part Two star to smooth the data out.)

Also new this year, I have expanded the top-ten lists into top-twenties. When I first started this, there were only 350 stars. We haven't quite doubled them now, but there are certainly many more puzzles than when I first started, and only listing top-tens would leave out many deserving puzzles.

Finally, I've updated to slim down most tables, as New Reddit sadly doesn't give much horizontal space, even on a big desktop, and Old Reddit is about to become more limited in who can use it.

 

The Guide

I'll list each category with a description of my rubric and a (totally subjectively categorized) set of problems in increasing order of difficulty by the first wave of Part Two solve times. The categories are listed down in groups within individual comments due to Reddit post size limits.

I'll also share some top-twenty lists of problems across all the years, plus rankings of the years themselves by various totals. And since it's been asked for before, I'll also preemptively share my raw data in CSV form.

Finally, as before, I'll post each year with a table of data:


r/adventofcode • • 2d ago

Other advent-mode: a small Emacs minor mode for AoC (fetch inputs, submit answers, without leaving Emacs)

16 Upvotes

Hi all,

AoC starts in a few days, so here's a thing I've been using myself: advent-mode, a small Emacs minor mode for the usual AoC chores. I've updated it a bit, and tried using on older puzzles, but additional testing would be great.

In short, you point it at your solutions repo (laid out as year2026/day03/ and so on, and the format is configurable).

Once that's set, it works out the year and day from whatever buffer you're in, so most commands need no prompting. It can:

  • Fetch your puzzle input and open it. It only downloads the first time, so it doesn't hit the server again.
  • Submit an answer for part 1 or 2. It takes the number at point or the active region as the default, and shows you the site's reply.
  • Open the puzzle page in eww.
  • Create a new day directory and copy in your template files.
  • Jump to any day you've already solved.
  • Show year, day and whether you're logged in (✓/✗) in the mode line.

Repo: https://github.com/vkazanov/advent-mode

My own solutions, which show the layout it expects: https://github.com/vkazanov/advent-of-code

Bug reports and "nice-if-s..." suggestions are very welcome (before December, obviously!) .

Good luck to us all this year!


r/adventofcode • • 2d ago

Other My user stylesheet for AOC: "Alter Old CSS"

Post image
19 Upvotes

I appreciate the style of the Advent of Code website. But it's hard to parse quickly, especially in the context of competitive programming. So back in 2025, I created a "user stylesheet" to improve the reading experience while still keeping the general feel of the design. I'm posting it here before the 2026 event, in hopes that it can help other people who feel the same way.

"Alter Old CSS" userstyle: https://userstyles.world/style/25353

To apply this stylesheet, you can install the Stylus browser extension, then go to the stylesheet's userstyles.world page (linked above) and click "Install". It will apply various styles meant to make the reading experience more pleasant, including:

  • Body text in a sans-serif font
  • More responsive design
  • Full-width code blocks (for easier triple-click selection)
  • Hover-text Easter eggs made clearer (NOTE: I also reveal them before all stars are collected, but in white instead of yellow)
  • Clearly delineated sponsor section
  • And more!

If you install this user stylesheet, let me know what you think of it!


r/adventofcode • • 2d ago

Repo Made a Rust crate for running AoC solutions

5 Upvotes

I’ve been doing Advent of Code for a while, and last year (I forgot to make a post...) I decided to make a little Rust crate to help run my solutions more easily. It’s called aoc-star.

You just add a#[star(day = X, part = X)] attribute to your functions, and it lets you run them from the command line. It can also fetch inputs and submit answers if you set it up with your session cookie.

I've found that it removes a bit of the tedious part of the challenge, hope that it can be useful to some. There is more info on the README.


r/adventofcode • • 3d ago

Other December Challenges this year

42 Upvotes

Tis the season!

Saw the post on Advent of code and wanted to mention all the other month-long challenges. Was wondering if there are other such challenges, happening annually, that I can look forward to.

  1. Advent of Code
  2. Advent of cyber - TryHackMe
  3. KringleCon

r/adventofcode • • 3d ago

Visualization [2025 Day 12] [C++] Generic 'solver' of polyomino problems

Post image
11 Upvotes

I made an Interactive solver with custom underlying algorithm for the 'polyomino packing problem' that chews through problems like the above in milliseconds*.

*Note: It's not an 'actual' solver. The problem is still NP-hard. It does not find 'the best' solution nor does it verify that such a solution even exists. What it does do is it computes some 'pretty good' solutions by way of localized 'next step' decisions using various heuristics (somewhat similar to how a human might approach this).

In AoC 2025 day 12 this is good enough ... as I imagine it might be in many practical applications.

Repo: https://github.com/InCom-0/BoxPacker_showcase


r/adventofcode • • 3d ago

Visualization What animation packages do you use?

11 Upvotes

I've done Advent of Code for the past few years and I'd like to try animating my solutions this time round. I've seen people over the years use a variety of animation software / packages to do their visualization, I'm curious for any specific reccs.

I usually use Python to code up my solutions and was considering learning Manim (the community version) or the base Matplotlib. I've also seen several people using TypeScript/JavaScript to animate. Open to any suggestions!


r/adventofcode • • 4d ago

Repo [2024 Day 16 & 18] [2025 Day 4 & 10] [Kotlin] After 3 years of AoC I collected my helpers into a library

3 Upvotes

This December will be my 4th Advent of Code. I solve it in Kotlin, and before AoC I took part in ICPC. For 3 years I wrote the same code again and again. Every grid began with a table of 4 offsets and a bounds check, and every maze began with a queue and a visited array.

Last year, before AoC 2025, I published the first part of my helpers as a library, kodvent. It had gcd and lcm, a disjoint set union, a segment tree and binary search, but not the code for maps and shortest paths, which I need most often. Now version 0.4.0 is out. It is the largest update so far, and it adds this code: grids, bfs and dijkstra, and a heap.

val maze = input.toGrid()  // input: List<String>
val start = maze.positionOf('S')

// The fewest steps from the start to every cell that can be reached
val steps = bfs(start) { p -> maze.neighbors(p).filter { maze[it] != '#' } }

// Dijkstra's algorithm, when entering a cell costs its digit
val risk = levels.toGrid { it.digitToInt() }  // levels: lines of digits
val costs = dijkstra(Position(0, 0)) { p -> risk.neighbors(p).map { it to risk[it] } }

A state of a search does not have to be a cell. It can be a cell with a direction, a bitmask or any data class.

To check that the library really helps, I rewrote 3 of my old solutions with it:

  • 2025 day 4: 49 lines became 19
  • 2024 day 18: 36 lines became 12
  • 2024 day 16, both parts: 108 lines became 16

The documentation shows both versions of each solution. It has spoilers for these 3 puzzles and for part 1 of 2025 day 10.

The library is Kotlin Multiplatform, has no dependencies and is published on Maven Central. It needs Kotlin 2.4.0 or newer:

implementation("io.github.dmitrynekrasov:kodvent:0.4.0")

I would like to know what you write again every December and what is missing in the library.


r/adventofcode • • 4d ago

Past Event Solutions [2021 Day 19] Finally solved beacons after five years :’)

34 Upvotes

I restarted this for probably the fifth time (but maybe third serious time) last night and stayed up until 4:30AM working on it, drawing lots of pictures. I am not a better programmer at 3:00AM and this is probably the first/most hand written code I’ve done since spring. I was a little worried I’d forget everything I was doing if I went to bed but I woke up three hours later and found the last bug. 🥹 part 2 was really easy except I printed the most recent distance instead of the longest distance and also tried to find the furthest apart beacons instead of scanners. That was easily fixed by reading/trying the sample.

Here is my code


r/adventofcode • • 5d ago

Meme/Funny every time

113 Upvotes

r/adventofcode • • 5d ago

Tutorial [2016 Day 22 Part 2] Solving the problem in front of you

5 Upvotes

There's a bit of advice floating around that you don't have to solve the general case, only the problem in front of you. And, well, I've been working through past years, and 2016 Day 22 felt like a really good example that, so I thought I'd turn it into a tutorial about what that means.

In the general sense, you're given something similar to a 15 Puzzle. There's a grid of data nodes, you can transfer data between adjacent ones, and you need to get the data from the top right to the top left. Except... the numbers are a red herring. There are really only 4 numbers. Empty, small enough to fit onto any node, large enough to fit more or less anything, and massive enough to be a wall. The explanation for part 2 even calls attention to this by reducing the nodes to three states - empty, filled, and wall.

So already, my first instinct was to plot things and see where the walls are... and there was just a contiguous wall cutting across one of the rows, with everything else free. That makes things a lot easier.

If the empty square is already next to the data, you can just do loop-de-loops to slide it along. For example, from

..G_
....

it takes 4 moves to move the empty square around G to

._G.
....

it takes 1 move to shift G over

.G_.
....

and then it takes another 5 moves to shift it over by 1 again

G_..
....

So if I've already moved the empty space to the starting space for the data, the remaining moves are just 5*(cols - 2)... because the entire first 2 rows are free of walls. And all you have to do is use your pathfinding algorithm of choice to move the empty space there, then add that constant.

There are ways this could have been made more difficult. If there were walls on row 1, I would have had to do actual pathfinding for moving things along. If there were walls on row 0, I would have had to move the data in a more complicated path. If there were multiple blocks of data that needed moved around, it would have been more complex to optimize. But because the problem was nicely arranged to make things easier, I was able to streamline the solution.


r/adventofcode • • 5d ago

Other If anyone is prepping for AoC this year and wants some warm up questions, have a look at this.

Thumbnail systemscheck.dev
62 Upvotes

Hello fellow nerds, I’ve been working on this programming puzzles website for a few months now, there are 13 puzzles live with another 3 releasing over the next few weeks (specifically won’t overlap with AoCs runtime). I’ve been roughly publishing a puzzle every two weeks since launching, I plan to take a break now and start again in late January. If you are looking for a fix of programming puzzles either before or after AoC, I hope you check it out. I personally can’t want for AoC this year, the most wonderful time of the year! Cheers folks


r/adventofcode • • 6d ago

Visualization [2026] Advent of Code Charts browser extension updates

31 Upvotes

Aloha folks! I've been operating the "Advent of Code Charts" browser extension for private leaderboards since 2018, and I typically do a round of fixes and updates just before the new event. You can get v8.0.0 in different ways:

There's been several community contributions (in the form of issues, suggestions, code, etc), some of the highlights include:

  • Performance improvements for huge leaderboards
  • Better 12-day support, and visual hints in graphs what the "puzzle days" are
  • Chart 2 => subtly show the "cumulative total stars" of the total leaderboard
  • Chart 4 => completely revamped to a fully delta-time (diff between part 2 and 1) focus
  • Chart 4 => subtly show the 'typical'/average delta-time, to see how you compare to the rest
  • User script (experimental) support
  • A few bugfixes and smaller improvements

Here you can see how (for a 12-day event) the background subtly changes color from day 13 onwards in chart 1, so you can get a feeling for who puzzled around release days, and who completed puzzles later on:

Points per Day chart with new background visuals

And here is an example of what chart 4 will look like (logarithmic scale of sorts, averages for the leaderboard, signed in user + top 2 other players enabled by default) with dummy data halfway through a 12-day event:

Delta-time chart with averages for the leaderboard

Finally, my own favorite part: the delta-time "leaderboard". Unchanged except for bugfixes, but worth to highlight it once over. This table can bring back some private leaderboard competition that is timezone-friendly! Assuming everyone plays fair on your leaderboard (no peeking ahead etc.) it allows you to compete for fastest solve time of part 2, starting the clock after solving part 1. That means you can start a puzzle whenver it best fits your personal life and timezone. An example with dummy data:

Delta-time leaderboard based on dummy data

If you have any questions, suggestions, bugs, or whatnot: either post them here or submit an issue on the GitHub repository.

Happy puzzling!


r/adventofcode • • 6d ago

Help/Question - RESOLVED [2016 Day 17 Part 2] Why am I getting infinitely many paths?

3 Upvotes

Ignore some of the scaffolding. My code's set up so I can benchmark it with JMH if I want to, which is why everything's a method that returns a Long, or why I have a State## object that just stores the input as an array of strings.

I'm representing each state as a pair of an IntVector and a String. IntVector is what it sounds like and just makes it more convenient to, say, change a coordinate by 1 for moving up or down, and then the String is obviously the path. getOpenDoors takes the password, my current position, and the path so far and determines which doors are unlocked, automatically filtering things so it won't try to progress from the target or step out of bounds. And for my loop, it first checks whether it's at the destination, then if it isn't, it calls getOpenDoors and adds all the possible next steps to the queue.

The only differences from my loop for part 1 are that instead of breaking after reaching the destination, it just continues. And then as part of figuring out what's going wrong, I switched removeFirst to removeLast to turn it into a stack/DFS instead of a queue/BFS. When I try logging things on the "bad" examples, like how hijkl ends in you getting trapped, it successfully terminates. But when I try it on an example like ihgpwlah it just keeps looping, instead of stopping at 370. Especially because of the DFS, it just blows up, and it hit the 3000s before I killed it.

Does anyone have an idea of what I'm missing? (It also doesn't help that 2016 is old enough that a lot of the pastes has expired or the threads will be littered with people scrubbing old posts, which makes it hard to look for advice)

fun part2(state: State17): Long {
    var res = 0L
    val queue = ArrayDeque<Pair<IntVector, String>>()
    queue.addLast(Pair(IntVector.of(0, 0), ""))
    while (queue.size > 0) {
        val (pos, path) = queue.removeLast()
        if (pos[0] == 3 && pos[1] == 3 && path.length > res) {
            res = path.length.toLong()
            println(path.length)
            continue
        }
        
        for (dir in getOpenDoors(state[0], pos, path)) {
            val nextPath = path + dir
            val nextPos = pos + when (dir) {
                "U" -> IntVector.UP
                "D" -> IntVector.DOWN
                "L" -> IntVector.LEFT
                else -> IntVector.RIGHT
            }
            queue.addLast(Pair(nextPos, nextPath))
        }
    }
    return res
}

fun getOpenDoors(password: String, pos: IntVector, path: String): List<String> {
    val md5 = (password + path).md5()
    val res = mutableListOf<String>()
    if (pos[0] != 3 || pos[1] != 3) {
        if (md5[0].code > 0x61 && pos[0] > 0) res.add("U")
        if (md5[1].code > 0x61 && pos[0] < 4) res.add("D")
        if (md5[2].code > 0x61 && pos[1] > 0) res.add("L")
        if (md5[3].code > 0x61 && pos[1] < 4) res.add("R")
    }
    return res
}

r/adventofcode • • 7d ago

Upping the Ante [2019 Day13] [Rust] - hunting for marginal speedups

4 Upvotes

While I'm waiting for Dec 1st I took a look at this one since it is one of the two slowest days of that year. I write in Rust, so my timings should be comparable to u/maneatingape. Unlike him I have a locally optimized version of my IntCode interpreter, which together with verifying that this particular day works fine with i32 instead of i64 elements have resulted in 1631 vs 2357 us as the benchmark.

https://github.com/TerjeWiigMathisen/aoc/blob/master/2019/day13/src/main.rs

Only 10 more days!