Implement Efficient Queues and Stacks with `collections.deque`
Utilize Python's `collections.deque` (double-ended queue) for fast appends and pops from both ends, making it ideal for implementing efficient queues, stacks, or sliding window algorithms.