View this PageEdit this Page (locked)Attachments to this PageHistory of this PageHomeRecent ChangesSearch the SwikiHelp Guide

Data Structures - Teaching Tips

Do visualizations of data structures see http://www.cstc.org/data/resources/65/idsv.html.

For stacks talk about a stack of books. Where would you add a new one (top)? Where would you take one from (top)? Use a Dixie cup holder to demonstrate a stack of cups or a coin holder. Or you can use a stack of playing cards. Use a stack to write
a program that can read a postfix algebraic expression and calculate the answer.

For queues talk about lines of people. How do people join a line (at the end) and how to people leave the line (from front) Use a queue to encode a text message. A queue will have in it a key which is a series of numbers that give the amount to add to a letter to get the encoded letter. Each time you use the first number from the queue add it to the back again until all the letters in the text message have been processed.

An example of a queue is a slideshow that keeps showing. An example of a stack is a stack of cards.

Link to this Page