Source: Digital Plumber
Part 1: A network of nodes is defined by a list of lines formatted as such:
2 <-> 0, 3, 4In this case, node
2is connected to0,3, and4and vice versa.How many nodes are in the group that contains the node
0?
Part 1: A network of nodes is defined by a list of lines formatted as such:
2 <-> 0, 3, 4In this case, node
2is connected to0,3, and4and vice versa.How many nodes are in the group that contains the node
0?
Part 1: Work on a hex grid:
\ n / nw +--+ ne / \ -+ +- \ / sw +--+ se / s \Given a series of steps (
n,se,ne) etc, how many steps away from the origin do you end up?
Part 1: Starting with a list of the numbers from
1tonand a list oflengths(as input):
- Initialize
current_positionandskip_sizeto0- For each
lengthelement in thelengthslist:- Reverse the first
lengthelements of the list (starting atcurrent_position)- Move forward by
lengthplusskip_size- Increment
skip_sizeby 1
After applying the above algorithm, what is the product of the first two elements in the list (from the original first position, not the
current_position)?
Part 1: An input stream can contain:
groupsare delimited by{and},groupsare nestable and may containgarbageor data (objects within agroupare comma delimited)garbageis delimited by<and>,groupscannot be nested withingarbage, a!withingarbageis an escape character:!>does not end a garbage segment
The score of a single group is equal to how many times it is nested (the innermost group of
{{{}}}has score3).
The score of a stream is the sum of the scores of all groups in that stream.
What is the total score of your input?
Part 1: Given a set of registers initialized to 0, interpret a series of instruction of the form:
{register} (inc|dec) {number|register} if {number|register} (<|<=|=|!=|=>|>) {number|register}
What is the largest value in any register?
Part 1: A tree is defined as such:
node (weight) -> child1, child2, ...node (weight)
Where a
nodealways has a weight, but may or may not have child nodes.
What is the name of the root
nodeof the tree (the node without a parent)?
Part 1: Start with
nstacks of different sizes. Take the largest block and distribute its items starting withn+1and looping around. How many iterations of this does it take before you see a state you’ve seen before?
Part 1: Interpret a program made entirely of jump instructions: each instruction is how many steps to jump. Any time you use an instruction to jump, increase the value of that jump by 1 for next time. How many total steps does it take to escape (jump out of bounds)?
Part 1: Given a list of passphrases, count how many contain no duplicate words.
Part 1: Create a grid in a spiral pattern like so:
17 16 15 14 13 18 5 4 3 12 19 6 1 2 11 20 7 8 9 10 21 22 23---> ...Given a specific index, what is the Manhattan Distance from that point to the origin (
1)?