Implement a FIFO queue using a Python list with a fixed capacity.
Constraints
Example
>>> q = Queue(2) >>> q.is_empty() True >>> q.enqueue(10) >>> q.enqueue(20) >>> q.is_full() True >>> q.peek() 10 >>> q.dequeue() 10 >>> q.dequeue() 20 >>> q.is_empty() True
Recent Submissions
No submissions yet — hit Run Tests to try!
Hints