@@ -0,0 +1,592 @@
+/**%0A *%09Design a stack that supports push, pop, top, and retrieving the minimum element in constant time.%0A *%0A *%09push(x) -- Push element x onto stack.%0A *%09pop() -- Removes the element on top of the stack.%0A *%09top() -- Get the top element.%0A *%09getMin() -- Retrieve the minimum element in the stack.%0A *%0A *%09Author: matao%0A */%0A%0Apublic class MinStack %7B%0A%09public static void push(int x) %7B%0A        %0A    %7D%0A%0A    public static void pop() %7B%0A        %0A    %7D%0A%0A    public static int top() %7B%0A        %0A    %7D%0A%0A    public static int getMin() %7B%0A        %0A    %7D%0A%0A    public static void main(String%5B%5D args) %7B%0A    %09%0A    %7D%0A%7D

add Min Stack solution