My Advent of Code 2020 Summary

JohnWatsonAtBaker
3 min readJan 2, 2021

I finished all 25 puzzles in AOC 2020 just before the new year. It was an enjoyable and informative experience. I had great fun solving/learning from others on how to solve these puzzles. Here is a short summary from me about AOC 2020.

  1. I solved about 15 problems out of the 25 without any struggle. Looking back at my notes along the process, I think at least the first 10 puzzles are quite approachable. For the remaining 10 problems, I solved the first part for the majority. For the problems I really got stuck on, I usually sought help on YouTube. There are a few video channels I have come across before that happen to be doing AOC 2020 contents and they have been really helpful.
  2. To me, the AOC problems are much more enjoyable than contest problems from LeetCode. I think one difference is that for LeetCdoe problems, I spent lots of time trying to handle all the edge cases. For AOC, the input scenario is kind of limited.
  3. Time complexity is real. There are maybe one or two puzzles for which I implemented something and started executing. Then the code just kept running for a really really long time. On the contrary, after watching someone else solving the problem and re-writing the code, the answer usually pops out in a second or so.

Here are some of my favorite problems in AOC 2020 (I might mention the algorithm used, so spoilers alert)

  1. Day 13.
    Part 2 is a textbook application of the remainder theorem. True story, I came across this theorem for math problems a few years ago and have forgotten about it ever since. I checked afterwards, this algorithm is also mentioned in the competitive programming handbook.
  2. Day 16.
    Part 2 reminds me of LU factorization used in numerical analysis.
  3. Day 18.
    Mind-blowing “abusive Python” implementation.
  4. Day 19.
    A good problem related to regular expression and/or context-free grammar.
  5. Day 20.
    This is definitely one of the hardest in my mind. It’s a simplified case of image stitching problems. It took me many hours to get the right implementation and the answer.
  6. Day 23.
    I didn’t think of linked list. This problem really made me feel stupid.
  7. Day 24.
    I had fun drawing the diagram and modeling the environment with a coordinate system.
  8. Day 25.
    A good reminder of the ```pow()```function in Python and modular exponentiation.

Helpful online resources I sought for help/inspiration/explanation:

  1. Jonathan Paulson’s YouTube Channel
  2. anthonywritescode’s YouTube Channel. He also has a Twitch channel where he livestreams coding sessions.
  3. George Hotz’s coding stream archive. He also has a Twitch channel.

My code is pushed to my GitHub.

My 50 stars

An interesting drawing I made for Day 24:

Coordinate system sketch

--

--