()
| 22 | } |
| 23 | |
| 24 | public int pop() { |
| 25 | if(isEmpty()){ |
| 26 | return -1; |
| 27 | } |
| 28 | int val = stack[index]; |
| 29 | val += operations[index]; |
| 30 | if(index>0){ |
| 31 | operations[index-1] += operations[index]; |
| 32 | } |
| 33 | operations[index] = 0; |
| 34 | index--; |
| 35 | size--; |
| 36 | return val; |
| 37 | } |
| 38 | |
| 39 | public void increment(int k, int val) { |
| 40 | if(isEmpty()){ |
no test coverage detected