by Volundr · 4y ago · 0 comments
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.