Source: Corruption Checksum
Part 1: The checksum of a list of numbers is the difference between the largest and smallest number in the row. What is the sum of checksums of a file containing many such lists?
Part 1: The checksum of a list of numbers is the difference between the largest and smallest number in the row. What is the sum of checksums of a file containing many such lists?
Part 1: Given a number, what is the sum of pairs of digits that match (wrapping the last digit around to the first)?
As mentioned in the main post, I’m structuring my solutions a bit differently this year. Rather than repeating the same relatively lengthy header in each function, we’re going to have a few shared files that can be imported or used for every problem.
Part 1: Take the assembunny interpreter from day 12 and add one new instruction (out
x
) which transmits the valuex
(either an integer or register). Find the lowest value we can initializea
to so that theout
put signals form an infinite repeating pattern of0
,1
,0
,1
, …
Part 1: Given a map of the form:
########### #0.1…..2# #.#######.# #4…….3# ###########
Part 1: Take the assembunny interpreter from day 12 and add an instruction (tgl
X
) that modifies the code at an offset ofX
instructions.
inc
becomesdec
; any other one argument instruction (includingtgl
) becomesinc
jnz
becomescpy
; any other two argument instructions becomejnz
- Toggling an instruction outside of the program does nothing (it does not halt execution)
- If toggling produces an invalid instruction, ignore it
Run the given program with the initial register of
a = 7
. What is the final value in registera
?
Part 1: You are given a grid of nodes and the output of the df command telling you how much space is on each. How many pairs of nodes are there where the data from some node
A
would fit entirely onB
?
Part 1: Another virtual machine, of sorts. Start with the string
abcdefgh
and apply a sequence of the following commands to it:
- swap position
X
with positionY
= swap two positions- swap letter
X
with letterY
= swap to letters, no matter where they are- rotate (left|right)
X
steps = rotate forward or backward- rotate based on position of letter
X
= findX
, rotate right based on its position; if the original position was >= 4, rotate one more1- reverse positions
X
throughY
= reverse a subset of the string- move position
X
to positionY
= take a character at a position out of the string and put it somewhere else specific
Part 1: Given a list of integer ranges (a la
5-8
), what is the first value not in any given range?
Part 1: Create a circular list of the numbers
1
throughn
. Going around the list, each currently remaining number removes the number after it. What is the last remaining number?