Implement stacks and queues