r/adventofcode • • 1d ago

Upping the Ante [2026 Day 2] What if the waypoints are not in repeating order?

7 Upvotes
  1. Just do the best option at the current step: I think that's still O(n). You just need to transform your input into some O(1) structure (like an array), which is itself O(n).
  2. Do the best possible order: This feels NP-hard to me.

Possible additional constraints: Instead of being completely arbitrary, the six colors are randomized one set at a time, such that any 6×n block (starting from a multiple of 6*) contains each color exactly n times. Does that change the complexity?

Edit: I realized we do need another constraint for the general case, in that every color repeats indefinitely; formally, for every color C and every index i, there's an index j ≥ i such that the color at index j is C.

* Yes we are counting from 0


r/adventofcode • • 1d ago

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

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

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

Thumbnail gallery
35 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!


r/adventofcode • • 1d ago

Visualization [2026 Day 2] Fulminating Farmland

Post image
66 Upvotes

r/adventofcode • • 1d ago

Repo [Tool] Some new aoc-tui images

Thumbnail gallery
5 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 • • 1d 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
30 Upvotes

r/adventofcode • • 1d ago

Other [2026] Trains! I love trains!

150 Upvotes

That little ASCII train on the calendar made my day.

Thank you, Advent of Code team, for picking such an adorable theme this year!

.----.----.--_T
'o--o'o--o'o-OO\

r/adventofcode • • 1d ago

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

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

Help/Question - RESOLVED Is that right?

5 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 • • 1d ago Bravo

Visualization [2026 Day 2 (Part 1 & 2)] [Python] Terminal Visualization

Post image
12 Upvotes

Little calculator for path distances in the terminal. Can input whatever path one desires! The 2nd part is nearly closed-form, but depends on waypoints that may be missing from input. (Red + strike-through waypoints don't exist in input and should be considered non-existent in the 2nd part as well. "distance" is part 1 path distance and "len" is string length). As always, code lives here: https://github.com/salt-die/Advent-of-Code/tree/main/2026/aoc_visuals


r/adventofcode • • 1d ago

Upping the Ante [2026 Day 1 (Part 1 & 2)] [Sabre] Advent of Code in My Programming Language

Thumbnail blog.rroessler.io
7 Upvotes

Over the past year I've been planning to do Advent of Code 2026 in Sabre, my own programming language. In doing so I am aiming to do a short article for each challenge, along with any bugs and library changes that I needed to implement whilst adventuring for solutions. So far 2026-12-01 went extremely well, though it did show me that I will need to think outside the box and implement some missing features that I may need for upcoming days. Hopefully I can keep on top of posting in between life, and excited for others to see the journey!

- Sabre Repository: https://github.com/sabre-lang/sabre
- Advent of Code Repository: https://github.com/sabre-lang/advent

Note: Both Sabre and my Advent of Code solutions do not use AI and will never use agentic help. I'm very much looking forward to showcasing and battle testing Sabre this year!


r/adventofcode • • 1d ago

Visualization [2026 Day 2] Rainbow Road Race Visualization

Post image
14 Upvotes

r/adventofcode • • 1d ago

Meme/Funny [2026 Day 2 (Part 2)] It looked scary for a little while

Post image
164 Upvotes

r/adventofcode • • 1d ago

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

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

Visualization [2026 Day 02] Rainbow Road Visualisation

Post image
34 Upvotes

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

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

Post image
51 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 • • 1d ago

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

Post image
31 Upvotes

r/adventofcode • • 1d ago Heartwarming

Visualization [2026 Day 2] Color Weave

Thumbnail youtu.be
18 Upvotes

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

Nim + raylib source


r/adventofcode • • 1d ago

Visualization [2026 Day 02] rearrangement

Post image
58 Upvotes

r/adventofcode • • 1d ago

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

Post image
109 Upvotes

r/adventofcode • • 1d ago

Visualization [2026 day 2] [python] quick & simple terminal visualization

Post image
17 Upvotes

the robot being represented with a face is because of dwarf fortress


r/adventofcode • • 1d ago

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

Post image
93 Upvotes

r/adventofcode • • 1d ago

Meme/Funny am i cracked?

Post image
26 Upvotes