Sharing my 28ms C++ solution
class MinStack {\n    private:\n        vector<int> myVector;\n        vector<int> myMins;\n    public:\n        void push(int x) {\n            myVector.push_b
    class MinStack {\n    private:\n        vector<int> myVector;\n        vector<int> myMins;\n    public:\n        void push(int x) {\n            myVector.push_back(x);\n            if(myMins.size()==0)\n                myMins.push_back(x);\n            else\n            {\n                int temp = myMins.back();\n                if(x<temp)\n                    temp = x;\n                myMins.push_back(temp);\n            }\n        }\n    \n        void pop() {\n            myVector.pop_back();\n            myMins.pop_back();\n        }\n    \n        int top() {\n            return myVector.back();\n        }\n    \n        int getMin() {\n            return myMins.back();\n        }\n    };
['C++']