LOADING: An error occurred. Update Chrome, try Firefox, or visit this post for more details.

⚠️Reddit changed how removals work, which breaks Reveddit's website. Install the extension to track removed content:Add to chromeAdd to firefoxWhat changed?
✖︎
about reveddit
⚙F.A.Q.add-ons
r/
status
copy sharelink
[+] show filters
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)
512 commentsredditother-discussionssubreddit-indexmessage modsop-focus

--- Day 3: Crossed Wires ---


Post your solution using /u/topaz2078's [paste](https://topaz....

... view full text

since 6 years, 1 month ago
6 of 6

Tip Reveddit Real-Time can notify you when your content is removed.

your account history
(check your username's removed content. why?)
Tip Check if your account has any removed comments.
view my removed comments
you are viewing a single comment's thread.
view all comments
[–][deleted]3 points6 years, 1 month ago* (edited 1 hour, 21 minutes after)

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!

permalinkhide replies (3)as-of
[–]zulfikar1231 point6 years, 1 month ago

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 ...

permalinkparentcontexthide replies (1)author-focusas-ofpreserve
[–][deleted]1 point6 years, 1 month ago

Funny enough that's what I thought of at first.

permalinkparentcontextas-of
[–]set221 point6 years, 1 month ago

Wow, I really appreciate the readability of this. As a newbie I can almost understand whats going on here. Nice work!

permalinkparentcontexthide replies (1)author-focusas-ofpreserve
[–][deleted]1 point6 years, 1 month ago

I'm glad you found my solution helpful. Cheers!

permalinkparentcontextas-of
[–]gavarava1 point6 years, 1 month ago

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..

permalinkparentcontextauthor-focusas-ofpreserve
r/revedditremoved.substack.com
🚨 NEWS 🚨
✖︎

Important: Reddit Changed How Removals Work

A recent Reddit update makes mod-removed content disappear from profile pages, which breaks Reveddit's website.

Install the browser extension to receive removal alerts.

Add to chromeAdd to firefox

What changed?

r/revedditremoved.substack.com