public void pop() {
        int tmp = stack.pop();
        
        if(tmp == min){
        	min = Integer.MAX_VALUE;
            for(Integer e : stack) {
            	if(e < min) {
            		min = e;
            	}
            }	
        }
    }