Aaron's Page

This is where I post about what I'm working on.

--- Day 12: Passage Pathing ---

or..

Who was was mythical "Dijkstra" anyways?

one art please

Part 1

Python

This one was intimidating. I was looking at some memes about the day on Reddit and saw mention of Dijkstra, so I kind of got intimidated. I decided before researching, I would just try to implement something on my own, which took some time but did end up working.

I had some helper functions to spawn new branches, check if branches were valid and "prune" them if they weren't and check if I was still actively branching. This ended up being enough to solve part 1.

Go

Still catching up

Part 2

Python

Part 2 was interesting. The short and long test data worked, but the medium test data did not. After looking at them for a few moments I realized that the medium test data and "start" and "end" points on the right as well as left of the connections, and short and long only had them on the left.

Rather than refactor my code, I formatted the input and that corrected the issue, it also returned the correct value in for my input (which also had mixed left and right start and end points.) It doesn't run instantly, but 20 seconds is fine by me.

Go

We'll see.

<< - Table of Contents - >>