MCPcopy Create free account
hub / github.com/Tiwarishashwat/InterviewCodes / insertFront

Method insertFront

DesignCircularDeque.java:15–23  ·  view source on GitHub ↗
(int value)

Source from the content-addressed store, hash-verified

13 }
14
15 public boolean insertFront(int value) {
16 if(isFull()){
17 return false;
18 }
19 front = (front - 1 + capacity) % capacity;
20 deque[front] = value;
21 size++;
22 return true;
23 }
24
25 public boolean insertLast(int value) {
26 if(isFull()){

Callers

nothing calls this directly

Calls 1

isFullMethod · 0.95

Tested by

no test coverage detected