Advent of Code 2020 - Day 1

preview_player
Показать описание
We solve todays challange at the advent of code 2020. Come join and have some fun.

Git repository:

Join the channel to get access to more perks:

Or visit my blog at:

Outro music: Sanaas Scylla

#aoc2020 #adventofcode #java
Рекомендации по теме
Комментарии
Автор

I discovered Advent of Code recently, somehow. I was trying to go through the 2019 challenges, but got busy with life and work. When I saw your video notification this morning it reminded me that I needed to do Day 1. I chose to do it in Python, as I want to improve my skill in the language. I ended up with a similar solution to you.

It also made me realize that I think I was starting to watch your videos last year around the time you were doing the Advent of Code, and not having started at Day 1, I was totally lost as to what you were trying to do :)

But your code really illustrates for me one of the things I hate about Java :) a huge block of code, with objects of objects of objects, and error handling ... just to read a simple text file. :)

aaronperl
Автор

Why not use an ArrayList? Makes the comparing much easier using the contains() method. I presume it's because of performance?

glokta