@@ -0,0 +1,598 @@
+import java.util.Stack;%0A %0Apublic class MinInStack %7B%0A %0A    Stack%3CInteger%3E mdata = new Stack%3C%3E();%0A    Stack%3CInteger%3E min = new Stack%3C%3E();%0A    %0A    public void push(int node) %7B%0A        mdata.push(node);%0A        if(min.isEmpty()%7C%7Cnode%3Cmin.peek())%7B%0A            min.push(node);%0A        %7D%0A        else%7B%0A            min.push(min.peek());%0A        %7D%0A    %7D%0A     %0A    public void pop() %7B%0A        if(!mdata.isEmpty())%7B%0A            min.pop();%0A            mdata.pop();%0A        %7D%0A    %7D%0A     %0A    public int top() %7B%0A        return mdata.peek();%0A    %7D%0A     %0A    public int min() %7B%0A        return min.peek();%0A    %7D%0A%7D%0A

Create MinInStack.java