Index

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

 

Advent of Code: solutions & explanations
After 2503 seconds, what is the maximum distance any reindeer has flown?
After 50 iterations?
Alternate approach: complex numbers
Alternate approach: numerical conversion
Alternate approaches: for/first or for/or
aoc-racket
aoc-racket/day01
aoc-racket/day02
aoc-racket/day03
aoc-racket/day04
aoc-racket/day05
aoc-racket/day06
aoc-racket/day07
aoc-racket/day08
aoc-racket/day09
aoc-racket/day10
aoc-racket/day11
aoc-racket/day12
aoc-racket/day13
aoc-racket/day14
aoc-racket/day15
aoc-racket/day16
aoc-racket/day17
aoc-racket/day18
aoc-racket/day19
aoc-racket/day20
aoc-racket/day21
aoc-racket/day23
aoc-racket/day24
aoc-racket/day25
apply, in Day 2 / How much paper is needed to wrap the boxes?
assoc, in Day 16 / Which Sue matches the attribute input, with the “retroencabulator” rules?
At what point does the elevator enter the basement?
case, in Day 16 / Which Sue matches the attribute input, with the “retroencabulator” rules?
compile-enforce-module-constants, in Day 7 / What’s the signal on wire a if wire b is overridden with a’s original value?
cond, in Day 7 / What’s the signal on wire a?
Day 1
Day 10
Day 11
Day 12
Day 13
Day 14
Day 15
Day 16
Day 17
Day 18
Day 19
Day 2
Day 20
Day 21
Day 22
Day 23
Day 24
Day 25
Day 3
Day 4
Day 5
Day 6
Day 7
Day 8
Day 9
define-syntax, in Day 7 / What’s the signal on wire a?
define-syntax, in Day 14 / After 2503 seconds, what is the maximum distance any reindeer has flown?
divisors, in Day 20 / What’s the first house that gets the target number of presents?
filter, in Day 20 / What’s the first house that gets the target number of presents, if each elf delivers 11 gifts to 50 houses?
flatten, in Day 12 / What’s the sum of all the numbers in the document?
for*/first, in Day 24 / What’s the score of the optimal group of packages, when divided into three groups?
for/first, in Day 1 / Alternate approaches: for/first or for/or
for/fold, in Day 1 / At what point does the elevator enter the basement?
for/fold, in Day 10 / What’s the length of the sequence after 40 iterations?
for/fold, in Day 14 / Under the new rule, how many points does the winning reindeer have?
for/fold, in Day 18 / How many lights are on after 100 iterations of the light-switching rules?
for/fold, in Day 21 / What’s the least we can spend and win?
for/or, in Day 1 / Alternate approaches: for/first or for/or
frequency-hash, in Day 14 / Under the new rule, how many points does the winning reindeer have?
How about six zeroes?
How many combinations have the minimum number of containers?
How many combinations of containers fit exactly 150 liters?
How many distinct molecules can be created after one transformation?
How many grid cells are visited if the path is split?
How many grid cells are visited?
How many lights are lit after following the instructions?
How many lights are on after 100 iterations of the light-switching rules?
How many lights are on after 100 iterations, if the corner bulbs are always lit?
How many strings are “nice” under new rules?
How many strings are “nice”?
How much paper is needed to wrap the boxes?
How much ribbon is needed to wrap the boxes?
if, in Day 7 / What’s the signal on wire a?
in-permutations, in Day 9 / What’s the shortest route that visits all the cities?
in-permutations, in Day 13 / What’s the optimal happiness score for a seating arrangement of eight?
in-permutations, in Day 13 / Optimizing in-permutations
jsexpr?, in Day 12 / What’s the sum of all the numbers in the document?
last, in Day 15 / What’s the best cookie we can make with 100 tsps that’s exactly 500 calories?
let, in Day 7 / What’s the signal on wire a?
map, in Day 14 / After 2503 seconds, what is the maximum distance any reindeer has flown?
map, in Day 2 / How much paper is needed to wrap the boxes?
map, in Day 3 / How many grid cells are visited?
max, in Day 9 / What’s the longest route?
max, in Day 14 / After 2503 seconds, what is the maximum distance any reindeer has flown?
md5, in Day 4 / What is the lowest-numbered MD5 hash starting with five zeroes?
min, in Day 9 / What’s the shortest route that visits all the cities?
Optimizing in-permutations
pregexp, in Day 5 / How many strings are “nice”?
read, in Day 8 / What’s the difference between the literal length of the strings, and their length in memory?
read, in Day 16 / Which Sue matches the attribute input, with the “retroencabulator” rules?
read-json, in Day 12 / What’s the sum of all the numbers in the document?
Refactored solution
regexp-match, in Day 11 / What’s the next password that meets the criteria?
regexp-match, in Day 5 / How many strings are “nice”?
regexp-match*, in Day 1 / Where does the elevator land?
regexp-match*, in Day 10 / What’s the length of the sequence after 40 iterations?
regexp-match-positions*, in Day 19 / How many distinct molecules can be created after one transformation?
regexp-replace*, in Day 11 / What’s the next password that meets the criteria?
regexp-replace*, in Day 19 / How many distinct molecules can be created after one transformation?
remove-duplicates, in Day 19 / How many distinct molecules can be created after one transformation?
shuffle, in Day 19 / What’s the fewest number of transformations that will generate the test module?
sort, in Day 24 / What’s the score of the optimal group of packages, when divided into three groups?
string-length, in Day 8 / What’s the difference between the literal length of the strings, and their length in memory?
Testing Day 1
Testing Day 10
Testing Day 11
Testing Day 12
Testing Day 13
Testing Day 14
Testing Day 15
Testing Day 16
Testing Day 17
Testing Day 18
Testing Day 19
Testing Day 2
Testing Day 20
Testing Day 21
Testing Day 23
Testing Day 24
Testing Day 25
Testing Day 3
Testing Day 4
Testing Day 5
Testing Day 6
Testing Day 7
Testing Day 8
Testing Day 9
thunk*, in Day 23 / What’s the value in register b after the program runs?
Under the new rule, how many points does the winning reindeer have?
vector, in Day 6 / How many lights are lit after following the instructions?
What code do you give the machine?
What is the lowest-numbered MD5 hash starting with five zeroes?
What is the total brightness of the lights if the rules are reinterpreted?
What’s the best cookie we can make with 100 tsps of ingredients?
What’s the best cookie we can make with 100 tsps that’s exactly 500 calories?
What’s the difference between the literal length of the strings, and their length in memory?
What’s the difference between the re-encoded length of the literal string, and the original length?
What’s the fewest number of transformations that will generate the test module?
What’s the first house that gets the target number of presents, if each elf delivers 11 gifts to 50 houses?
What’s the first house that gets the target number of presents?
What’s the least mana we can spend and win?
What’s the least we can spend and win?
What’s the length of the sequence after 40 iterations?
What’s the longest route?
What’s the most we can spend and lose?
What’s the next password that meets the criteria?
What’s the next valid password after that?
What’s the optimal happiness score for a seating arrangement of eight?
What’s the optimal happiness score, including ourself in the seating?
What’s the optimal score when divided into four groups?
What’s the score of the optimal group of packages, when divided into three groups?
What’s the shortest route that visits all the cities?
What’s the signal on wire a if wire b is overridden with a’s original value?
What’s the signal on wire a?
What’s the sum of all the numbers in the document?
What’s the sum of all the numbers, if hash tables with value "red" are ignored?
What’s the value in register b after the program runs?
What’s the value in register b if register a starts as 1?
Where does the elevator land?
Which Sue matches the attribute input, with the “retroencabulator” rules?
Which Sue matches the attribute input?
~v, in Day 8 / What’s the difference between the re-encoded length of the literal string, and the original length?