Module advent_solutions::advent2017::knot_hash [] [src]

Functions

hash

To achieve this, begin with a list of numbers from 0 to 255, a current position which begins at 0 (the first element in the list), a skip size (which starts at 0), and a sequence of lengths (your puzzle input). Then, for each length:

hash_lengths

In this example, the first two numbers in the list end up being 3 and 4; to check the process, you can multiply them together to produce 12.

hash_str

The logic you've constructed forms a single round of the Knot Hash algorithm; running the full thing requires many of these rounds. Some input and output processing is also required.

new_nums