Skip to main content

Module day10

Module day10 

Source
Expand description

§Knot Hash

Instead of reversing elements from the starting position then trying to handle wrap around, it’s easier to use rotate_left to rotate the array by the same amount so that the starting position is always zero, then take advantage of the built-in reverse method.

Functions§

hash 🔒
Performs the knot hash algorithm using a fixed-size array for better performance.
parse
part1
part2