design implementation circular doubleende queue dequeimplement MyCircularDeque classmycirculardequeint k Initializes deque maximum size kboolean insertfront add item Deque return true operation successful false otherwiseboolean insertLast add item rear Deque return true operation successful false otherwiseboolean deletefront Deletes item Deque return true operation successful false otherwiseboolean deleteLast Deletes item rear Deque return true operation successful false otherwiseint getfront Returns item Deque return 1 deque emptyint getRear return item Deque return 1 deque emptyboolean isempty return true deque false otherwiseboolean isfull return true deque false example 1inputmycirculardeque insertLast insertLast insertfront insertFront getrear isfull deleteLast insertfront getfront3 1 2 3 4 4 outputnull true true true false 2 true true true 4explanationmycirculardeque myCircularDeque new MyCircularDeque3myCircularDequeinsertLast1 return TruemyCircularDequeinsertLast2 return TruemyCircularDequeinsertFront3 return truemycirculardequeinsertfront4 return false queue fullmycirculardequegetrear return 2mycirculardequeisfull return TruemyCircularDequedeleteLast return truemycirculardequeinsertfront4 return truemycirculardequegetfront return 4 Constraints1 k 10000 value 1000at 2000 call insertfront insertlast deletefront deleteLast getfront getrear isempty isfull