Module day05

Source
Expand description

ยงSupply Stacks

Functionsยง

parse
Parses the input in 2 stages.
part1
Move elements from stack to stack, reversing each time.
part2
Move elements from stack to stack without reversing.
play ๐Ÿ”’
get_disjoint_mut allows us to acquire two simultaneous mutable references to disjoint indices. A nice standard library feature is that we can collect an iterator of chars into a String for the final answer.

Type Aliasesยง

Input ๐Ÿ”’
Move ๐Ÿ”’
Stack ๐Ÿ”’