Archive
-
Applying Cramer’s Rule for Advent of Code 2024, day 13
Day 13 is relatively easy, especially if you’re comfortable with math. I originally started with a purely brute-force approach, but it quickly became clear that it would be inefficient as the difficulty increased. When I attempted the puzzle, I was already a few days behind. After a hint from a friend who was keeping up…
-
Finally, an application for my FSM library! Advent of Code 2024 day 11
We’ve finally completed 10 puzzles, surpassing my previous record (though I still have days 24 and 25 to tackle, and I’ll likely need to revisit day 12 for part two). Coincidentally, I was able to adapt my FSM library to solve day 11. While it’s not the most efficient solution, I’m eager to share it.…
-
Climbing a depth-first search hill, Advent of Code 2024, day 10
Today, we’re diving into the Day 10 puzzle. Like Day 6, it’s a 2D grid, but this time, we need to consider multiple paths. It’s fascinating to see how depth-first search comes into play here. Each point on the map is represented by a single-digit integer indicating its height, ranging from 0 to 9, with…
-
How to parse computer code, Advent of Code 2024 day 3
Having tackled some of the later Advent of Code challenges, I wanted to revisit Day 3, which presented an interesting parsing problem. The task involved extracting valid code from a noisy input, a great exercise in parser and lexer development. Join me as I explore my approach to this challenge. When I first wrote about…
-
How to repair a bridge, Advent of Code 2024 Day 7
After what felt like an eternity (five hours, to be precise), Day 20 part 2 finally decided to cooperate. I’m still slightly dazed from the wait, but duty calls! Today we’re tackling Day 7 of Advent of Code, picking up where we left off with Day 6 last week. Our task today is to repair…
-
How to trace steps in a map, Advent of Code 2024 day 6
Back to my Advent of Code challenge, due to some unforeseeable issues, I am unable to complete the challenges in time and am currently about 5–6 days behind. However, I am still determined to complete the puzzles this year. Today, let’s discuss the 6th puzzle. Looking for things in a 2D plane seems to be…
-
Video data IO through ffmpeg subprocess
As I restarted my job search (yes, I am still #OpenToWork, ping me!), in one of the job applications, I was asked to implement a prototype that processes video data. While working through the project, I unexpectedly got a lot of help from generative AI chatbots due to my relatively inexperience in the area. As…
-
How to code a Sorting Algorithm for Advent of Code 2024 day 5
In the previous post, I briefly mentioned that I am participating in this year’s Advent of Code. Co-incidentally, in one of the puzzles, specifically the one published on day 5, involves fixing the order of pages in a list. This came not long after I posted about implementing a sorting algorithm, so I figure I…
-
Why does everyone love sorting algorithms?
I had an interview a few weeks ago, and was asked to implement a sorting algorithm. I didn’t manage to do it on the spot, but managed to revise and sent it back in my follow-up email. That was my second time implementing a sorting algorithm, the first was during my play through of Human…
-
Building state machine library with help from AI tools
Just out of boredom, while waiting for my follow-up interview sessions, I built a state-machine library, powered by genruler. I built one in the past, to be exact, during my first job after graduation. This implementation is loosely based on the design my supervisor drafted back then. The project also aimed to showcase how the…