import java.util.Stack;
public class Solution {
//创建一个数据栈和最小值栈
Stack<Integer> dataStack = new Stack<Integer>();
Stack<Integer> minStack = new Stack<Integer>();
public void push(int node){
dataStack.push(node);
if(minStack.isEmpty()|| node < minStack.peek()){
minStack.push(node);}
else{
minStack.push(minStack.peek());}}
public void pop(){
dataStack.pop();
minStack.pop();}
public int top(){return dataStack.peek();}
public int min(){return minStack.peek();}}