Aloha, welcome to fourth day of Advent of Code 2021. Playing Bingo against a giant squid turned out to be more of struggle than I anticipated. I wanted to avoid loops for this puzzle and ended with a solution, which is a little bit hard to understand. Nevertheless, here it comes:
rand_n <- read.csv(file = "day_four_seq", header = FALSE, sep = ",") rand_seq <- as.integer(rand_n[1,]) #read the matrices mat_n <- lapply(1 : 100, function(x){ as.
Aloha, welcome to the third day of Advent of Code 2021. Again, I am going to solve this puzzle using Base R. Please see https://adventofcode.com/2021/day/3 for the problem description.
Part 1:
bin_data <- read.csv(file = "day_three", col.names = "bin", header = FALSE, colClasses = "character") head(bin_data) ## bin ## 1 110011110101 ## 2 110011100010 ## 3 010100011010 ## 4 011001100000 ## 5 010011011101 ## 6 011110111000 bin_m <- matrix(data = as.
Hi, welcome to the solution to day two of Advent of Code 2021. Please check out the puzzle at https://adventofcode.com/2021/day/2
# Data -------------------------------------------------------------------- dir_data <- read.csv(file = "day_two", col.names = c("direction", "value"), header = FALSE, sep = " ") head(dir_data) ## direction value ## 1 forward 9 ## 2 down 3 ## 3 down 8 ## 4 forward 2 ## 5 up 3 ## 6 forward 5 Part 1:
Hi,
welcome to my solutions to the challenges of Advent of Code 2021. I present my solutions as a short post for every daily challenge. If you do not know what is going on, please go ahead and check out https://adventofcode.com/. I will not go into detail about the problem for day one, since you can simply visit https://adventofcode.com/2021/day/1.
The goal for this year is to solve every puzzle.