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 ofchar
s into aString
for the final answer.