Motivation

I always like solving problems and this is a very nice place to practise my skills. This year, I would like to learn more concepts and I’m already liking this AOC. For starters, we have a lot of participation and people are streaming when they’re solving the puzzles. I like the way Jonathan Paulson’s videos are done. They are precise and really nice to see. He’s fast too and that makes me want to look and think through a puzzle with his level of understanding and speed. I also like Liz Fong-Jones’ Go solutions. My solutions are over here.

Day 2

The day two challenge was an easy one. What was required was to navigate the submarine using a series of commands. For each command, you manipulate the positions of the horizontal and depth values. I dilly-dallied on part one to get my go interfaces and receivers right. Part two only needs a slight tweak. However, I did not catch the point where I was not supposed to change the values for down and up commands however, I quickly rectified that and was good to go. So far, I like doing this in Go as it gives me an easier framework to compose my solutions.

You can find my solution to this exercise in golang here.

Day 1

Pretty simple exercise. It involved getting the number of times values in an array increase. So given an array like [1,2,3,2,4,1], the increases are 3. In the first part, the task was to get the total number of increases going through the array. In the second part, the task was switched up to get the sum of increases in a sliding window of three values. So for [1,2,3,2,4,1] the first window has [1,2,3] and the next window has [2,3,2]. If you sum that, then there is an increase and that’s the first one. You go on until the end of the array where the values in the window are less than three.

You can find my solution to this exercise in golang here.