Advent of Code: Day 8

Source

Part 1: Given an escaped string of the form "\xa8br\x8bjr\"", convert it to the escaped form: br js. Calculate the total difference of lengths between the former (16) and the latter (5).

read more...


Advent of Code: Day 7

Source

Part 1: Given a list of definitions of the form 123 -> x, NOT e -> f, and x AND y -> z, with possible operations NOT, AND, OR, LSHIFT, and RSHIFT, find the value of a. Assume all values are 16-bit integers.

read more...


Advent of Code: Day 6

Source

Part 1: Given a 1000 by 1000 grid of lights and a list of instructions of the form (turn on|turn off|toggle) 5,10 through 15,20, determine how many lights are on.

read more...


Advent of Code: Day 5

Source

Part 1: A ’nice’ string contains at least three vowels, one double letter (such as xx), and none of the strings ab, cd, pq, or xy. Count nice strings.

read more...


Advent of Code: Day 3

Source

Part 1: Given a string of <>^v characters which mean move west, east, north, or south respectively and starting at the origin, how many unique positions do you pass through?

read more...


Advent of Code: Day 2

Source

Part 1: A gift requires enough wrapping paper to cover the surface plus an additional amount equal to the area smallest side. Calculate the total wrapping paper needed for a list of dimensions of the form 2x3x4.

read more...


Advent of Code: Day 1

Source

Part 1: Given a string of () characters controlling a simulated elevator, where ( means ‘go up’ and ) means ‘go down’, what floor do you end up on?

read more...


Advent of Code

I’m always on the lookout for new sources of quick1 coding puzzles. This holiday season, Advent of Code scratches precisely that itch.

Advent of Code is a series of small programming puzzles for a variety of skill levels. They are self-contained and are just as appropriate for an expert who wants to stay sharp as they are for a beginner who is just learning to code. Each puzzle calls upon different skills and has two parts that build on a theme. – About - Advent of Code

I’ve been working out each problem thus far in Python (my language of choice; along with Racket). I’m backfilling the first seven posts (along with this one), but I’ll try to do the rest daily.

read more...