I opted for a LinkedList and added a shift function to it. That way I was only ever looking at the head of the list and it made reasoning about it easier.
12/09/2018, 5:49 PM
pretty awesome 🙂, I literally never use LinkedList in my daily job, so I am not very familiar with them what they can do, but these addLast()/removeFirst() combinations seem pretty awesome 🙂. I would say that this seems as one of the cleverest solutions so far, good job! 🙂 K