Charlie Stuart - Blog


Advent of Code 2021

I mentioned in my day 1 post that I didn't know how long I'd last in Advent of Code this year. I want to continue getting better at C and not rely on Python for the harder problems like I did in past years. Sadly, I've got a lot going on at the moment, so I'm not gonna try and convince myself that I have a chance of finishing. I'm gonna try anyway, see how far I get and progressively add to this post. Then on December 25th, no matter where I'm at, I'll post it.

Flash forward a few weeks: I stopped writing about days on Day 4. Then I stopped doing problems at midnight on Day 8. I've had time to go back and do Day 9 and 10. I've been beyond busy with finishing final grades, graduate school applications, and also taking my break from classes. I honestly forgot about this post I had started until I went to start a new one. Overall, I think I did a lot better this year compared to past years. I wish I had more time to finish more days, but I did a lot better in C than I did in Python in past years. I also started building a library in C for Advent of Code. I want to keep filling this in with data structure and algorithm implementations. I'm not sure how much time I'll have in the future to work on this though.

[GitHub Repo]

Day 2

I don't know if these problems are easier than years past or if I've gotten more competent. The navigation problem is a classic one. I probably could've shaved at least a minute off my time if I had multiplied the depth and horizontal distance from the start. I also forgot that scanf doesn't include spaces when it grabs strings, which led to a slight bug I needed to fix. Either way, I continue to do quite a bit better than years past.

Year Part 1 TimeRank Part 2 TimeRank
202100:08:59627900:11:1447839
202000:13:47319800:24:233722
2019>24h43950>24h39831

Day 3

I misread this problem SO MANY times. Spent too long debugging, realizing I had misread the problem again, then restarting debugging. I also, in my speed code writing frenzy, proceeded to forget everything I knew about binary, so that was fun.

I did do better than last year in part 1, which I'm happy about. Part 2 is a different story. I made the classic rookie mistake of not storing the input to reference in part 2. I'll get better tomorrow.

If I do get through tomorrow, I will have completed an equal amount of Advent of Code problems in C and Python. Then in two days, I'll be able to say I've technically done the majority of Advent of Code in C.

Year Part 1 TimeRank Part 2 TimeRank
202100:10:38323601:50:0311021
202000:38:07735600:44:226449
2019>24h30927>24h28426

Day 4

Today was significantly more relaxing and enjoyable than yesterday. Debugging was more straight forward, I didn't make silly mistakes. There was a BINGO theme. It was a nice confidence boost after yesterday.

I have officially completed an equal number of challenges in C and Python. It's been really nice to see how much I've improved since I've started.

Year Part 1 TimeRank Part 2 TimeRank
202100:26:06206700:53:313829
202000:15:28293300:58:254092
2019>24h29256>24h29298

Day 5

Year Part 1 TimeRank Part 2 TimeRank
202100:27:06366600:49:054108
202000:45:35721801:13:488011
2019>24h21530>24h20258

Day 6

Year Part 1 TimeRank Part 2 TimeRank
202100:13:17450300:37:274562
202000:12:19461400:30:555669
2019>24h18943>24h18260

Day 7

Year Part 1 TimeRank Part 2 TimeRank
202100:11:49532700:17:434466
202000:55:44501901:09:163852
2019>24h13543>24h19534

Day 8

I started doing day 8 at midnight, then I saw part 2 and decided to call it for the night. From what I can tell, day 8 was universally tough for part 2. I have conflicting feelings about my part 2 solutions. I like how I used integers and bits to mimic a set. I'm not proud of how I went about finding each number in the 4bit7seg. This was the last day I even partially finished the day it was released.

Year Part 1 TimeRank Part 2 TimeRank
202100:23:326663>24h60394
202000:17:174627>24h56412
201914:45:311233516:11:3712089

Day 10

Another one of those problems I completed about a week after it was released, so I'm not gonna include statistics.

I liked this problem. It's a variation of a problem I did in my data structures class. I'm TAing the same class in the winter. When I took the class, I did it in Python. This year, they started moving over to C. This problem took a lot longer than I was expecting since I took the time to write my own stack in C. Other than that, it was a fun straight forward problem.

Language Stats

This doesn't add up exactly. I can't find my 2018 solutions anywhere, then I also did some days in both languages.

YearStarsCPython
202120★20
202031★267
201927★27
20183★
2017
2016
2015
Total81★4634


Back to Top