Activity #13

Stacks vs. Queues

Activity Type: drama

Discipline: programming

Area: Data Structures (CS2)

to show the different applications of stacks and queues.

Time needed (estimate): 15 minutes

have students form a stack as they arrive for class and then give out rewards from the top of the stack. if you run out of rewards, clearly the students who were late were rewarded and those there early were not. talk about how this is not fair, and so this is an inappropriate use of a stack.

Materials needed: "treats"

Submitted by David J. Barnes (SIGCSE 97) on Wednesday, August 27, 1997 at 16:48:40 EDT/EST.

After you have tried this activity, you can add feedback on how it worked for you

You can also read the feedback of others who tried this activity

Return to the Activities List