(int x)
| 10 | } |
| 11 | |
| 12 | public void push(int x) { |
| 13 | _data.add(x); |
| 14 | if (_min.isEmpty()){ |
| 15 | _min.push(x); |
| 16 | } |
| 17 | else{ |
| 18 | if (x > _min.peek()){ |
| 19 | x = _min.peek(); |
| 20 | } |
| 21 | _min.push(x); |
| 22 | } |
| 23 | } |
| 24 | |
| 25 | public void pop() { |
| 26 | _data.pop(); |
no outgoing calls
no test coverage detected