Clean 6ms Java solution
```\nclass MinStack {\n\tprivate Node head;\n        \n    public void push(int x) {\n        if (head == null) \n            head = new Node(x, x, null);\n    
```\nclass MinStack {\n\tprivate Node head;\n        \n    public void push(int x) {\n        if (head == null) \n            head = new Node(x, x, null);\n        else \n            head = new Node(x, Math.min(x, 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    private class Node {\n        int val;\n        int min;\n        Node next;\n            \n        private Node(int val, int min, Node next) {\n            this.val = val;\n            this.min = min;\n            this.next = next;\n        }\n    }\n}
[]