Swift - Tuple
```\n\nclass MinStack {\n    var stack: [(element: Int, min: Int)] = []\n\n    func push(_ x: Int) {\n        \n        if stack.count == 0 {\n            stack
```\n\nclass MinStack {\n    var stack: [(element: Int, min: Int)] = []\n\n    func push(_ x: Int) {\n        \n        if stack.count == 0 {\n            stack.append((x, x))\n        } else {\n            let top = self.getMin()\n            stack.append((x, x > top ? top : x))\n        }\n    }\n    \n    func pop() {\n        stack.popLast()\n    }\n    \n    func top() -> Int {\n        stack.last?.element ?? -1\n    }\n    \n    func getMin() -> Int {\n        stack.last?.min ?? -1\n    }\n}\n\n/**\n * Your MinStack object will be instantiated and called as such:\n * let obj = MinStack()\n * obj.push(x)\n * obj.pop()\n * let ret_3: Int = obj.top()\n * let ret_4: Int = obj.getMin()\n */
['Swift']