52
SOLUTION MEGATHREAD-🎄- 2019 Day 3 Solutions -🎄-(self.adventofcode)
submitted 6 years, 1 month ago* (edited 14 minutes after) by daggerdragon to /r/adventofcode (134.8k)
since 6 years, 1 month ago
6 of 6
Tip Reveddit Real-Time can notify you when your content is removed.
your account history
Tip Check if your account has any removed comments.
view my removed comments you are viewing a single comment's thread.
view all comments


Java
This was my first time ever doing Advent of Code so I didn't realize there was 2 parts to the problem. Sorry for the edit. Here, is my solution for both parts (using a HashMap).
* Edit: Solution for both parts!
man I struggled so hard with day 3 I gave up and looked at your answers. Should've known to use a hashmap. I kept running out of heap space trying to compute a huge x by y sized 2d array ...
Funny enough that's what I thought of at first.
Wow, I really appreciate the readability of this. As a newbie I can almost understand whats going on here. Nice work!
I'm glad you found my solution helpful. Cheers!
Appreciate the solution, quite readable and simple. I spent the last three days and couldn't solve it. Because I spent half a day visualizing the problem by creating a GridNavigator & whatnot. :) HashMaps do solve a lot of complex traversal problems it seems..