Code samples from Episode 39 and 41, using arrays as a queue and stack