Clear Python code; faster than 96%
\nclass MinStack:\n\n    def __init__(self):\n        """\n        initialize your data structure here.\n        """\n        self.stack = []\n        self.curr
```\nclass MinStack:\n\n    def __init__(self):\n        """\n        initialize your data structure here.\n        """\n        self.stack = []\n        self.currentMin = float(\'inf\')\n        self.prevMins = []\n        \n    def push(self, x: int) -> None:\n        self.stack.append(x)\n        if x <= self.currentMin:\n            self.prevMins.append(self.currentMin)\n            self.currentMin = x\n\n    def pop(self) -> None:\n        if self.stack[-1] == self.currentMin:\n            self.currentMin = self.prevMins.pop()\n        self.stack.pop()\n\n    def top(self) -> int:\n        return self.stack[-1]\n\n    def getMin(self) -> int:\n        return self.currentMin\n```\n
['Python', 'Python3']