Data structures: Stacks and Queues

A series of coloured wooden ducks used to illustrate sequences and queues
Duck goose march image by DaKub from Pixabay

A teacher asked us about Data structures resources relating to teaching Stacks and Queues and how these might be effectively delivered in a lesson to A level students.

Prof Paul Curzon suggested the following (edited for the website) –

“Physically I get students on stage with chairs and we model different ways of implementing queues. I get them to think about queues and how they work in reality (bus stops vs delicatessen queue with ticket vs Drs waiting room vs airline check-in (priority queues) etc and discuss which ones are the same (but with different implementation) and which are different.

I also always use a stack of chairs to physically model stacks.”

He also suggested an excerpt from his slides, from one of the undergraduate courses he teaches on, available as either a .key or .pdf and also chapter 11 (11. The Other Queue Always Goes Faster (Queues and Stacks) – on page 136 (137 of the 198 page PDF)) in our free booklet called Computing without computers by Prof Paul Curzon.