AOC 2022 Day Two #756
Replies: 11 comments 35 replies
-
Mine is super super silly https://github.com/BogDAAAMN/advent-of-code-2022/blob/main/day-02.js But I can't wait to see how you folks did it better and more efficient 😂 |
Beta Was this translation helpful? Give feedback.
-
Raise your hand if you had to write down the values of everything on a piece of paper to make the hash of values. |
Beta Was this translation helpful? Give feedback.
-
Here's my ruby solution realized reducing would have been better in python but not going to change my solution now after posting. |
Beta Was this translation helpful? Give feedback.
-
Holy mother of fuck I spent WAY TOO LONG operating under the assumption that A/B/C was your play, not your opponent's play. The worst part? The example given works if you make that assumption. Anyhow. https://github.com/doleraj/adventofcode/blob/main/aoc2022/src/day02/index.ts |
Beta Was this translation helpful? Give feedback.
-
Here's my solution! https://github.com/danieltott/aoc2022/blob/main/src/day02/index.ts Had some fun with I also used nested switches. I really feel like there's a neeater way to do this... |
Beta Was this translation helpful? Give feedback.
-
I'm not sure how I feel about this answer. There's some stuff I'm glad I did, but I spent wayyyyy too long updating my scaffolding for this whole thing, which had nothing to do with today at all. More F#, fp style goodness. I also have a utility file with some convenient glue funcs I keep using throughout these things. |
Beta Was this translation helpful? Give feedback.
-
It works, but it's not pretty? I did it in 2 parts rather than trying to refactor my code to cover both parts. And I did it in JS |
Beta Was this translation helpful? Give feedback.
-
JS https://github.com/clandau/advent-of-code/blob/main/2022/day-2/2.js |
Beta Was this translation helpful? Give feedback.
-
here's another F# take at it |
Beta Was this translation helpful? Give feedback.
-
It's so inspiring to see all these creative solutions! I'll post mine once I make my repo public again. |
Beta Was this translation helpful? Give feedback.
-
Here's mine! I got part 1 but the change up for part 2 felt targeted haha Gonna try day 3 and come back to this, but would appreciate any new strategy hah |
Beta Was this translation helpful? Give feedback.
-
Discussion of solutions for Advent of Code Day 2 here
VC Advent of code leaderboard
Go to leaderboard/private and use join code
363496-e6f42283
Beta Was this translation helpful? Give feedback.
All reactions