Design and implement a queue using only two stacks. The queue should support the basic operations of a normal queue: enqueue, dequeue, peek, and checking if the queue is empty.
You are given a nested list of integers nestedList, where each element can either be an integer or a sublist containing integers or other sublists. Implement an iterator to flatten this nested list.
Design and implement a Circular Queue. A circular queue is a linear data structure where the operations follow the FIFO principle, and the last position is connected to the first, forming a circle. This design allows better space utilization.
Design a data structure that simulates a circular double-ended queue (deque) with a fixed maximum size. Implement the MyCircularDeque class with methods for inserting, deleting, and accessing elements at both ends of the deque.