19 Lines Simple Answer, 31ms
class MinStack {\npublic:\n\n    stack Data, Min;\n\n    void push(int x) {\n        Data.push(x);\n        if(Min.empty()||x<Min.top()) Min.push(x);\n        e
class MinStack {\npublic:\n\n    stack<int> Data, Min;\n\n    void push(int x) {\n        Data.push(x);\n        if(Min.empty()||x<Min.top()) Min.push(x);\n        else Min.push(Min.top());\n    }\n\n    void pop() {\n        if(Data.empty()) return;\n        Data.pop();\n        Min.pop();\n    }\n\n    int top() {\n        if(!Data.empty())\n            return Data.top();\n    }\n\n    int getMin() {\n        if(!Min.empty());\n            return Min.top();\n    }\n};
[]