Sidebar

Advent of Code

"Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearAD
Advent of Code D_schreiber 9 months ago 100%
Advent of Code 2023 recap blog post [https://dan-schreiber.com/blog/2024/1/8/advent-of-code-2023-recap](https://dan-schreiber.com/blog/2024/1/8/advent-of-code-2023-recap). Thanks to Eric Wastl and [@a

Advent of Code 2023 recap blog post [https://dan-schreiber.com/blog/2024/1/8/advent-of-code-2023-recap](https://dan-schreiber.com/blog/2024/1/8/advent-of-code-2023-recap). Thanks to Eric Wastl and [@adventofcode](https://lemmy.world/c/adventofcode) for another great year. [#adventofcode](https://mastodon.social/tags/adventofcode) [#adventofcode2023](https://mastodon.social/tags/adventofcode2023) [#aoc](https://mastodon.social/tags/aoc)

3
0
"Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearAD
Advent of Code hal9001 10 months ago 100%
Day 6 Solutions https://adventofcode.com/2023/day/6
3
4
"Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearAD
Advent of Code hal9001 10 months ago 75%
Day 5 Solutions https://adventofcode.com/2023/day/5
2
2
"Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearAD
Advent of Code heimchen 10 months ago 50%
Day 4: Don't forget, that in 2, the point multiplying isn't any more

If you add tickets with the point multiplier the code is just off by one, and I spotted the problem immediately.

0
1
"Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearAD
Advent of Code hal9001 10 months ago 100%
Day 4 Solutions https://adventofcode.com/2023/day/4
6
4
"Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearAD
Advent of Code hal9001 10 months ago 100%
Day 3 Solutions https://adventofcode.com/2023/day/3
6
4
"Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearAD
Advent of Code the_beber 10 months ago 100%
My solutions so far (this year)

Hey, I've got a few solutions written in Kotlin. - [Day 1](https://gist.github.com/eingruenesbeb/dd9fb02bf1911421689de5c1e5c4f219) - [Day 2](https://gist.github.com/eingruenesbeb/135911e5fd1896817c8f94743f314fd0) What do you think? I feel like I cheated a bit on the solution for the first day using built-in functions to search the line-string, but if it works, don't fix it I guess...

2
0
"Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearAD
Advent of Code hal9001 10 months ago 100%
Day 2 Solutions https://adventofcode.com/2023/day/2
5
4
"Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearAD
Advent of Code mykl 10 months ago 100%
Day 1 solutions https://adventofcode.com/2023/day/1

How was day one for everyone? I was surprised at how tricky it was to get the right answer for part two. Not the usual easy start I've seen in the past. I'd be interested to see any solutions here.

8
6
"Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearAD
Advent of Code hal9001 10 months ago 100%
It's almost time ☃️
5
0
"Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearAD
Advent of Code mykl 10 months ago 100%
Nadvent of Code - 2022 Day 25 https://dartpad.dev/?id=004680836fce05e69a8be7e05b68cf3c

As a warmup for this year's Advent of Code, I'm re-reading and posting my solutions to [last year's challenges](https://adventofcode.com/2022). You can read, run and edit today's solution by following the post link. [Today](https://adventofcode.com/2022/day/25) was the final challenge for the year, and as usual was quite simple and had only one part. This involved parsing and process numbers written in what I learned was called "[balanced base](https://en.wikipedia.org/wiki/Balanced_ternary) five" notation. Thanks for following along, now we just need to wait a few days to see what this year holds!

3
1
"Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearAD
Advent of Code mykl 10 months ago 100%
Nadvent of Code - 2022 Day 24 https://dartpad.dev/?id=0673f9bfd8af2158050f0e55ba75451b

As a warmup for this year's Advent of Code, I'm re-reading and posting my solutions to [last year's challenges](https://adventofcode.com/2022). You can read, run and edit today's solution by following the post link. [Today](https://adventofcode.com/2022/day/24) had us running round a maze with moving obstacles. Treating time as a dimension allowed me to build a graph and find the shortest path. Part 2 just required doing this three times. This took me closer than I like to a full second runtime, but not close enough to make me re-think my solution.

2
0
"Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearAD
Advent of Code mykl 10 months ago 100%
Nadvent of Code - 2022 Day 23 https://dartpad.dev/?id=5c5cc4b78c1b541159db97f34a5b389a

As a warmup for this year's Advent of Code, I'm re-reading and posting my solutions to [last year's challenges](https://adventofcode.com/2022). You can read, run and edit today's solution by following the post link. [Today](https://adventofcode.com/2022/day/23) was a kinda variant of Conway's Game of Life: we had to move elves around according to a set of rules while avoiding collisions and observe the size of the bounding box after 10 rounds. Part 2 asked us to run until the pattern stagnated. Nothing clever in my solution as most of the challenge seemed to be in understanding the rules correctly :-)

3
0
"Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearAD
Advent of Code mykl 10 months ago 75%
Nadvent of Code - 2022 Day 22 https://dartpad.dev/?id=12713657a02660c09fe3c9e548e7d7e9

As a warmup for this year's Advent of Code, I'm re-reading and posting my solutions to [last year's challenges](https://adventofcode.com/2022). You can read, run and edit today's solution by following the post link. [Today](https://adventofcode.com/2022/day/22) started quite easily: build a map and then follow some directions to navigate around it. Part 2? The map is now wrapped around a cube. Oof. I dealt with it by setting up logic for an "ideal" cube layout, and then mapping the provided definition onto that. Oddly, my solution for part2 seems to run faster than part1 despite all the added complexity...

2
0
"Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearAD
Advent of Code mykl 10 months ago 66%
Nadvent of Code - 2022 Day 21 https://dartpad.dev/?id=95d1e587ec0cf63b4cfe987e8a582fbf

As a warmup for this year's Advent of Code, I'm re-reading and posting my solutions to [last year's challenges](https://adventofcode.com/2022). You can read, run and edit today's solution by following the post link. [Today](https://adventofcode.com/2022/day/21) was again quite an easy one, requiring us to build up a tree of values and operations on those values. Part 1 had us evaluate the root value, and part 2 required us to change the value of a specific node to ensure that both branches below the root node evaluated to the same value. The linear nature of the operations allowed me to just try two different values and then interpolate the correct answer.

1
0
"Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearAD
Advent of Code mykl 10 months ago 40%
Nadvent of Code - 2022 Day 20 https://dartpad.dev/?id=2ae60c3e3a6ae2edf57a5eff9c298d8d

As a warmup for this year's Advent of Code, I'm re-reading and posting my solutions to [last year's challenges](https://adventofcode.com/2022). You can read, run and edit today's solution by following the post link. [Today](https://adventofcode.com/2022/day/20) came as a welcome relief after two tricky days! We had to jumble a file according to some simple rules. The biggest challenge was interpreting the instructions correctly; the solution itself took only a few lines. Part two just added a key and increased the number of iterations. My original approach still ran in under a second (0.7s) so I didn't bother looking into it any further, and just enjoyed the free time :-)

-1
1
"Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearAD
Advent of Code mykl 10 months ago 60%
Nadvent of Code - 2022 Day 19 https://dartpad.dev/?id=d7d31d6b8c9cd1c2b2fb1f4eb272e729

As a warmup for this year's Advent of Code, I'm re-reading and posting my solutions to [last year's challenges](https://adventofcode.com/2022). You can read, run and edit today's solution by following the post link. [Today](https://adventofcode.com/2022/day/19) was a sudden increase in difficulty (for me anyway). We had to find the best route for opening a system of valves to maximise the total flow through the network. Part two repeated the exercise, but with the addition of a friendly elephant to help with the work. I was able to simplify the network enough to solve part 1 in a reasonable time, but had to hack my solution for part 2 terribly to get it under a second. Reading some other solutions, I missed out on some key approaches including pre-calculating minimum paths between all pairs of valves (e.g. using the [Floyd–Warshall algorithm](https://en.wikipedia.org/wiki/Floyd–Warshall_algorithm)), aggressive caching of intermediate states, and separating out my movements from the elephant's movements. Go and read [@hal9001@lemmy.world](https://lemmy.world/u/hal9001)'s [Clojure solution](https://github.com/jjcomer/advent-2022/blob/main/src/y2022/d19.clj) for a much more thoughtful approach :smile:

1
1
"Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearAD
Advent of Code mykl 10 months ago 80%
Nadvent of Code - 2022 Day 18 https://dartpad.dev/?id=d7d31d6b8c9cd1c2b2fb1f4eb272e729

As a warmup for this year's Advent of Code, I'm re-reading and posting my solutions to [last year's challenges](https://adventofcode.com/2022). You can read, run and edit today's solution by following the post link. [Today](https://adventofcode.com/2022/day/18) had us finding the surface area of a cluster of cubes, first in total, then excluding any internal voids. Nice and easy compared to the last couple of days!

3
0
"Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearAD
Advent of Code mykl 10 months ago 75%
Nadvent of Code - 2022 Day 17 https://dartpad.dev/?id=7be747054a44186eab0f39911a889b96

As a warmup for this year's Advent of Code, I'm re-reading and posting my solutions to [last year's challenges](https://adventofcode.com/2022). You can read, run and edit today's solution by following the post link. [Today's challenge](https://adventofcode.com/2022/day/17) had us building a simple Tetris clone with the additional twist that a regular sequence of jets of air blow the falling pieces sideways. Part two asked us to model this for a bazillion cycles, so we needed to keep an eye on the pattern of landed blocks and look for the same pattern to repeat.

2
0
"Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearAD
Advent of Code mykl 10 months ago 80%
Nadvent of Code - 2022 Day 16 https://dartpad.dev/?id=21918b81ce0862035af8941732185e42

As a warmup for this year's Advent of Code, I'm re-reading and posting my solutions to [last year's challenges](https://adventofcode.com/2022). You can read, run and edit today's solution by following the post link. [Today](https://adventofcode.com/2022/day/16) we had to monitor and manage flow through a network of valves. The second part added a friendly elephant to help. So for me it was about building a weighted graph and then milling around it looking for good solutions. Despite my chaotic approach and somewhat ugly code, my solution ended up being impressively fast.

3
0
"Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearAD
Advent of Code mykl 10 months ago 66%
Nadvent of Code - 2022 Day 15 https://dartpad.dev/?id=e7a65ba0de0eaf3af0e5047993a1db07

As a warmup for this year's Advent of Code, I'm re-reading and posting my solutions to [last year's challenges](https://adventofcode.com/2022). You can read, run and edit today's solution by following the post link. [Today](https://adventofcode.com/2022/day/15) we were given the output of a set of sensors recording the locations of their nearest beacons, and were asked to derive more information about those beacons. This was made much simpler due to the odd way these beacons' signal propagated, involving tracking diagonal lines rather than doing any trig. Part 2 required a bit of lateral thinking to avoid an overly-slow solution.

1
0
"Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearAD
Advent of Code opr 10 months ago 71%
What is Nadvent of code how do I get it?

The 2023 event starts in december, I'll try it in Rust. What are the posts about Nadvent of code and where can I find the tasks?

3
7
"Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearAD
Advent of Code mykl 10 months ago 66%
Nadvent of Code - 2022 Day 14 https://dartpad.dev/?id=018911e7d2f3acf18878b98c80f5ddcf

As a warmup for this year's Advent of Code, I'm re-reading and posting my solutions to [last year's challenges](https://adventofcode.com/2022). You can read, run and edit today's solution by following the post link. [Today](https://adventofcode.com/2022/day/14) we had to build a set of buckets from the given spec, and observe the behaviour of sand grains as they fell into them. I found this a really satisfying challenge, and enjoyed the visualisations that many people wrote for their solutions.

1
0
"Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearAD
Advent of Code hal9001 10 months ago 85%
AoC 2023 Goals

Does anyone have any goals they are hoping to achieve this year? I'm planning to try and learn Raku but probably not use it as my primary solution language. I always prefer to do a secondary implementation in the new language so I'm not stuck on syntax and how to solve the problem. As always my goal is to finish all the stars ✨🌟✨

5
9
"Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearAD
Advent of Code mykl 10 months ago 66%
Nadvent of Code - 2022 Day 13 https://dartpad.dev/?id=b0229038302825e766735a5c71c7760c

As a warmup for this year's Advent of Code, I'm re-reading and posting my solutions to [last year's challenges](https://adventofcode.com/2022). You can read, run and edit today's solution by following the post link. [Today](https://adventofcode.com/2022/day/13) we had to build and compare tree structures. I used Petitparser to parse the input and build the tree, and some questionable logic for the comparison, but it gave the right answer and quickly enough, so ship it!

1
0
"Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearAD
Advent of Code mykl 10 months ago 33%
Nadvent of Code - 2022 Day 12 https://dartpad.dev/?id=6bd913aa909968c43775f67798c604d5

As a warmup for this year's Advent of Code, I'm re-reading and posting my solutions to [last year's challenges](https://adventofcode.com/2022). You can read, run and edit today's solution by following the post link. Continuing the ramp up in difficulty, [today's challenge](https://adventofcode.com/2022/day/12) asked us to do some literal (virtual) hill-climbing, but with the added constraint of not allowing too large a step. I was able to re-use an existing Graph class I had built along with an implementation of Dijkstra search.

-1
0
"Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearAD
Advent of Code mykl 10 months ago 50%
Nadvent of Code - 2022 Day 11 https://dartpad.dev/?id=4f01128fb5d643630d1cae157c933395

As a warmup for this year's Advent of Code, I'm re-reading and posting my solutions to [last year's challenges](https://adventofcode.com/2022). You can read, run and edit today's solution by following the post link. Proving that the jump in difficulty yesterday wasn't a fluke, [today's challenge](https://adventofcode.com/2022/day/11) required careful interpretation of the instructions, as well as parsing a complicated input describing how a bunch of monkeys update and pass values between them. I had originally (ab)used the incredible [Petitparser](https://pub.dev/packages/petitparser) package for this, and was surprised to see this is supported in DartPad so no rewrite was needed. Part two increased the number of rounds dramatically, so using the Least Common Multiple kept numbers under control without moving to BigInts.

0
0
"Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearAD
Advent of Code mykl 10 months ago 75%
Nadvent of Code - 2022 Day 10 https://dartpad.dev/?id=ec8de8c97bcd045af9c7faf139db924c

As a warmup for this year's Advent of Code, I'm re-reading and posting my solutions to [last year's challenges](https://adventofcode.com/2022). You can read, run and edit today's solution by following the post link. [Today's challenge](https://adventofcode.com/2022/day/10) felt like a massive jump in the complexity of the problem statement. Fortunately this resolved into a reasonably simple solution. The one fly in the ointment was that part 2 required you to 'read' what letters were displayed on the 'screen'. As there seems to be one puzzle each year that requires this, I had a simple OCR solution available from a previous year.

2
0
"Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearAD
Advent of Code mykl 11 months ago 66%
Nadvent of Code - 2022 Day 9 https://dartpad.dev/?id=3946d480d2495858035af35df9317584

As a warmup for this year's Advent of Code, I'm re-reading and posting my solutions to [last year's challenges](https://adventofcode.com/2022). You can read, run and edit today's solution by following the post link. Today we had to drag a segmented worm's head around a grid according to a given set of directions and count how many cells the tail visited. For part 2, the worm got longer. Solving this felt much easier than yesterday's challenge. That must mean tomorrow will be tricky...

1
0
"Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearAD
Advent of Code mykl 11 months ago 75%
Nadvent of Code - 2022 Day 8 https://dartpad.dev/?id=a2f73b120ad6620d14ff769d54c71efd

As a warmup for this year's Advent of Code, I'm re-reading and posting my solutions to [last year's challenges](https://adventofcode.com/2022). You can read, run and edit today's solution by following the post link. I remember really enjoying this challenge. We were asked to determine visibility across a grid of variable height trees, first looking in, then looking out. What was easy to describe turned out to be quite tricky to implement (for me at least!). As so many AOC problems involve navigating around grids, I had a handy Grid class availalble to help me. Perhaps a bit OTT for this use, but when you have a hammer...

2
0
"Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearAD
Advent of Code mykl 11 months ago 75%
Nadvent of Code - 2022 Day 7 https://dartpad.dev/?id=79c3a90c943832e67ba9e2d1b63dcfe6

As a warmup for this year's Advent of Code, I'm re-reading and posting my solutions to [last year's challenges](https://adventofcode.com/2022). You can read, run and edit today's solution by following the post link. Quite a jump in difficulty today, requiring us to reconstruct and query a notional filesystem based on the results of a series of `cd` and `ls` commands. Building a simple graph revealed the required information.

2
0
"Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearAD
Advent of Code mykl 11 months ago 66%
Nadvent of Code - 2022 Day 6 https://dartpad.dev/?id=402e2525f8589b6d90e08d03ad3286ae

As a warmup for this year's Advent of Code, I'm re-reading and posting my solutions to [last year's challenges](https://adventofcode.com/2022). You can read, run and edit today's solution by following the post link. Another simple challenge today, requiring us to look for (and avoid) repeating characters in a given run of characters. I suspect the authors hoped we would write clever code that noted the locations of any repeated characters and then skipped forward to avoid them, but the source text and key lengths were so small that none of that was necessary. Just mashing every successive run of test candidates into a Set to test for uniqueness ran all tests and the full solution in 65ms.

1
0
"Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearAD
Advent of Code mykl 11 months ago 75%
Nadvent of Code - 2022 Day 5 https://dartpad.dev/?id=a480e2052abf13375efaed310a89e873

As a warmup for this year's Advent of Code, I'm re-reading and posting my solutions to [last year's challenges](https://adventofcode.com/2022). You can read, run and edit today's solution by following the post link. After a few days of gentle introductory challenges, things ramped up a little today. Not due to the difficulty of the puzzle itself, but the unhelpful way in which the input data was formatted :-). Given that increase in difficulty, I think a lot of people were expecting part 2 to be a Towers of Hanoi challenge, but no, it was just a simple change to part 1.

2
1
"Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearAD
Advent of Code mykl 11 months ago 80%
Nadvent of Code - 2022 Day 4 https://dartpad.dev/?id=1167aa8e2d270557545424506850a3f8

As a warmup for this year's Advent of Code, I'm re-reading and posting my solutions to [last year's challenges](https://adventofcode.com/2022). You can read, run and edit today's solution by following the post link. This challenge required us to identify overlapping ranges. One of my first programming jobs many years ago involved writing a maintenance scheduling system, and I still remember the 'Aha!' moment when I realised how much simpler the checks could be than the convoluted rules that were my first attempt. Anyway, this time round I just re-used a class from a previous year to model the ranges. Much easier :-)

3
0
"Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearAD
Advent of Code mykl 11 months ago 80%
Nadvent of Code - 2022 Day 3 https://dartpad.dev/?id=029f5bf750c29c133b5f5f1f114e7f3f

As a warmup for this year's Advent of Code, I'm re-reading and posting my solutions to [last year's challenges](https://adventofcode.com/2022). You can read, run and edit today's solution by following the post link. This challenge was about rucksack packing but, rather than the classic computer science problem, it only required finding the common character between different strings. I chose to simply drop the strings into Sets and find the intersection.

3
0
"Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearAD
Advent of Code mykl 11 months ago 83%
Nadvent of Code - 2022 Day 2 https://dartpad.dev/?id=96a60324a73eb1dc73d0d9378af0068c

As a warmup for this year's Advent of Code, I'm re-reading and posting my solutions to last year's challenges. You can read or run today's solution by following the link above. Day 2 involved playing Rock Paper Scissors following a strategy guide. I solved part one by building a simple look-up table encoding the provided score values. Solving part two just required building a second lookup table to key into that first table.

4
0
"Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearAD
Advent of Code mykl 11 months ago 50%
Nadvent of Code - 2022 Day 1 https://dartpad.dev/?id=7aa48de1ed7c3d1ad06455ffb5ecad52

As 2023 Advent of Code is approaching fast, I thought I'd revisit my 2022 entries, and I realised a good focus would be to post one a day during November. No guarantees as to the quality of the algorithms used, but hopefully people will find the code readable and interesting. If anyone has questions or ideas for improvement, I'd love to hear them. They were all written in Dart, and I will modify each one to allow it to run online in the browser. Some of the code may look a little odd as I had to inline the functionality from some libraries that I used as DartPad doesn't support them all. Anyway, here's the core of my response to Day 1. The full code can be read and run by following the link above. ``` int part1(String lines) => totalCalories(lines).first; int part2(String lines) => totalCalories(lines).take(3).sum; Iterable totalCalories(String lines) => lines .split('\n\n') .map((e) => e.split('\n').map(int.parse).sum) .sorted(descending); ```

0
0
"Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearAD
Advent of Code hal9001 11 months ago 100%
2023 Event is up! 🎄🎄

Time to start practicing and catching up on prior missed stars. ☃️

10
0
"Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearAD
Advent of Code karburator 1 year ago 100%
What programming languages do you use to solve AoC tasks?
1
0