Then somewhere between day 10 and 15, there will be a steep increase in difficulty and I'll tap out for the year. Then come back to the puzzles over the course of the year and maybe knock out another one or two.
Then somewhere between day 10 and 15, there will be a steep increase in difficulty and I'll tap out for the year. Then come back to the puzzles over the course of the year and maybe knock out another one or two.
library(tidyverse) # pre-typed
lines = readLines("data/day1.txt") %>% as.numeric() # Read data
diff(lines) %>% .[. > 0] %>% length() # Part 1
This didn't involve me being a sophisticated or good programmer, and if I was in a time zone to be competitive I also would have written a function to submit my answer from within my IDE (which can also be pre-written). I could absolutely buy people wanting to be competitive and being able to do this in 30 seconds. I actually could have pre-written the second line of three, in point of fact.https://adventofcode.com/2020/day/20
Did they hope the corner tiles had unique edges and look for those? (which would be unlikely under normal circumstances, considering there are more than a hundred tiles and only 256 different possible edges...)
> Tiles at the edge of the image also have this border, but the outermost edges won't line up with any other tiles.
So they didn't need to hope; the problem guaranteed it for them.
I remember being flabbergasted at first, and then realizing the above. My solution is here:
https://github.com/linus/aoc/blob/main/2020/js/day-20/app.js
Also, that's really nicely written code :)
It's not just measuring your problem solving abilities but also your famiarity with the author's writing style.
Apple's Dictionary (Oxford?)
> 2 the edge or boundary of something, or the part near it: the northern border of their distribution area | figurative : the unknown regions at the borders of physics and electronics.
https://www.merriam-webster.com/dictionary/border
> 1 : an outer part or edge
https://www.dictionary.com/browse/border
> the part or edge of a surface or area that forms its outer boundary.
I personally don't mind, if I spend 10 days learning a new language and solving some problems I'm satisfied. I'm still very excited when AoC comes up every year!