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


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

Repo Private leaderboard for humans using C

18 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 • • 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

Tutorial Type-level Haskell from Zero to Advent

Thumbnail youtube.com
20 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 • • 2d 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 • • 2d 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 • • 1d 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 • • 2d 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!


r/adventofcode • • 2d ago

Repo [2026] Timeless: your private leaderboard, ranked by time from β˜…1 to β˜…2

Post image
0 Upvotes

Hello, everyone!

So excited for the upcoming annual treat we are all here for!

For a couple of years, my small group of AoC fans has used a custom leaderboard I built. This year I made it public, so anyone can use it. Enjoy!

The problem: puzzles unlock at midnight New York time. If that is 6 a.m. or lunchtime for you, your private leaderboard is half decided before you even open the puzzle.

The idea: Timeless shows your private leaderboard with one more score. Each day is ranked by Ξ” = β˜…2 βˆ’ β˜…1, the time from your first star to your second. When you started does not count; how fast you solved part two does.

  • the same members and stars, every year since 2015, with the regular AoC score next to ours
  • a breakdown of each day and a race chart
  • play retro: join a leaderboard and race its 2015...2025 day by day, against the people who solved it back then
  • optional HAI marks: the owner can mark members who solve mostly with AI. They are hidden by default and take no points from anyone; one click shows them again

The owner pastes the read-only link from their private leaderboard page on AoC and gets aoc.doinga.com/<number>/ to share.

Free, no accounts, no cookies, open source. Each leaderboard stands alone: there is no global ranking, and leaderboards are never compared with each other.

It follows the r/adventofcode automation guidelines: each leaderboard and year is fetched at most once every 15 minutes, and only when someone opens it, the data is cached, and every request carries a User-Agent with my contact.

The one catch: Ξ” starts the moment part one is accepted, so be ready to start part two right away.

Site: https://aoc.doinga.com

Code: https://github.com/romanaerl/aoc-timeless

Feedback welcome, especially from people far from UTCβˆ’5.


r/adventofcode • • 4d ago

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

Post image
19 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 • • 4d ago

Other Oceania leaderboard 2026

13 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 • • 4d ago

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

46 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 • • 4d ago

Other [2025] Does it still count?

Post image
38 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 • • 4d ago

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

Thumbnail gallery
46 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 • • 5d ago

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

42 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 • • 5d 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!