Stacks and Queues: Choosing the Right Data Structure