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
105
SOLUTION MEGATHREAD-🎄- 2022 Day 2 Solutions -🎄-(self.adventofcode)
submitted 3 years, 1 month ago* (edited 4 days, 4 hours after) by daggerdragon to /r/adventofcode (134.8k)
1501 commentsredditother-discussionssubreddit-indexmessage modsop-focus

NEW AND NOTEWORTHY

  • All of our rules, FAQs, resources, etc. are in our [community wiki](/r/adve...

... view full text

since 3 years, 1 month ago
7 of 7

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
[–]Pyr0Byt37 points3 years, 1 month ago

Go/Golang

Not really happy with the hardcoding, but oh well...

permalinkhide replies (2)author-focusas-ofpreserve
[–][deleted]3 points3 years, 1 month ago
[deleted] by user
(check your username's removed content. why?)
parenthide replies (1)as-of
[–]Pyr0Byt32 points3 years, 1 month ago

Thanks! Hopefully I'll actually finish this year; never did get around to completing 2021... are you working on the puzzles too? I'd love to see your repo.

permalinkparentcontexthide replies (1)author-focusas-ofpreserve
[–][deleted]2 points3 years, 1 month ago
[deleted] by user
(check your username's removed content. why?)
parenthide replies (1)as-of
[–]Pyr0Byt32 points3 years, 1 month ago

To be fair, my initial solutions usually aren't very concise either. I definitely go back all the time to clean up, simplify, or straight-up refactor. All part of the process.

Good luck with the future puzzles, we got this!

permalinkparentcontextauthor-focusas-ofpreserve
[–]cmatei2 points3 years, 1 month ago

Not really happy with the hardcoding

Why? That's not how I did it, but for 9 possible inputs and easy calculations this is good style imho.

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

Yeah... after thinking about it for a bit and looking at some of the other solutions, it definitely seems to be the simplest thing that works.

I had a nagging feeling that there must be some clever/concise way of solving it with math, but that'd probably end up being more code and not really any clearer.

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