Runtime: 3 ms, faster than 100.00% of Java online submissions for Min Stack.
\nclass MinStack {\n\n    /** initialize your data structure here. */\n    class Node{\n        int val;\n        int min;\n        Node next;\n        \n      
```\nclass MinStack {\n\n    /** initialize your data structure here. */\n    class Node{\n        int val;\n        int min;\n        Node next;\n        \n        public Node(int val , int min , Node next){\n            this.val = val;\n            this.min = min;\n            this.next = next;\n        }\n    }\n    \n    private Node head;\n    \n    public MinStack() {\n        head = null;\n    }\n    \n    public void push(int val) {\n        if(head == null)\n            head = new Node(val ,val ,null);\n        else\n            head = new Node(val , Math.min(val ,head.min), head);\n    }\n    \n    public void pop() {\n        head = head.next;\n    }\n    \n    public int top() {\n        return head.val;\n    }\n    \n    public int getMin() {\n        return head.min;\n    }\n}\n```
['Java']