The CircularDeque is holding an additional element, which exceeds the intended number of elements it should contain. This issue causes the is_full method to incorrectly return False even when the deque is already full.
Changes
Fixes the number of elements condition.
Behavior
The fix ensures that the CircularDeque accurately maintains the intended number of elements and correctly reports if it is full or not.
Introduction
The CircularDeque is holding an additional element, which exceeds the intended number of elements it should contain. This issue causes the is_full method to incorrectly return False even when the deque is already full.
Changes
Fixes the number of elements condition.
Behavior
The fix ensures that the CircularDeque accurately maintains the intended number of elements and correctly reports if it is full or not.