aoc2022-5 - generic stack

from blog blog, | ↗ original
aoc2022-5 - generic stack This puzzle can be solved straight forward by implementing a stack and process the move instructions properly. Since it is past august 20221, let’s implement it with generics to make it type-independent: type Stack[T any] struct { items []T } The first array element of item is the bottom of the stack, while the last...