20
๐ท - 2024 DAY 3 SOLUTIONS -๐ท
(programming.dev)
An unofficial home for the advent of code community on programming.dev!
Advent of Code is an annual Advent calendar of small programming puzzles for a variety of skill sets and skill levels that can be solved in any programming language you like.
Solution Threads
M | T | W | T | F | S | S |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 |
Icon base by Lorc under CC BY 3.0 with modifications to add a gradient
console.log('Hello World')
I couldn't figure it out in haskell, so I went with bash for the first part
Shell
but this wouldn't rock anymore in the second part, so I had to resort to python for it
Python
Really cool trick. I did a bunch of regex matching that I'm sure I won't remember how it works few weeks from now, this is so much readable
My first insinct was similar, add line breaks to the do and dont modifiers. But I got toa caught up thinking id have to keep track of the added characters, I wound up just abusing split()-
Nice, sometimes a few extra linebreaks can do the trick...