In this repo I will try to publish my solutions for the Advent of Code Challenge 2022. My personal goal is, to learn the language Ruby by solving the puzzles with this programming language.
Feel free to join on the journey towards an (hopefully) advanced Ruby programmer.
It was a bumpy start with a lot of searching on stackoverflow and the documentation for Ruby. Finally, I found a solution which is working and pretty straight forward. I tried also to get the data directly from the AoC website but here I struggled.
The weekend was great. A lot of programming flow. I managed to solve the problems. The problem of day 4 was a hard nut. It took me about eight attempts to finally solve it.
I am feeling better in handling Ruby. With this confidence, the challenge of day 5 was nice.
Sliding window problem - yeah! It was a pleasure :-) I was confused about the re-arrangement of the test input results but finally got it right.
This was a hard nut!!! Damm it. Finally, I found a - for me - smart solution. It took a lot of brainwork...
I must confess that I am addicted to the AoC.... I tried today and finally solved the first part of the puzzle. However, I was not able to solve the second part. I am sure that I have missed something. I was not able to find a way for getting the numbers of visible trees correct. And I think that the same approach of the first part can be used for the second part.
Back on track! The first time, I have built Snake with Ruby! That was nice.
This was a nice one. Didn't recognize at first, that the position of the sprite is only between 1 and 40. Finally solved it.
Have I mentioned that I am addicted to AoC? I started today at 6:30 and finished a bit later (don't ask when). The first part was straight forward. The second part was tricky. I removed the division by 3 and run into a memory allocation problem. The next approach was to write the read files. Didn't solve the problems with the large numbers. So I searched and finally found a solution for the problem. This is obvious now - normalize the number by the modulus of the product of all modulus.