Swift with some comments
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity: O(n)\n\n- Space complexity: O(n)\n\n# Code\n```\nclass Solution {\n    func removeKdigits(_ num: String, _ k: Int) -> String {\n            guard num.count >= k else { return "0" }\n            var stack = ""\n            var removeCount = 0\n            var canRemove: Bool { removeCount < k && !stack.isEmpty }\n            \n            // Create monotonically increasing stack\n            for digit in num {\n                // While we have removes, try to ensure leading digits are in ascending order, use removes to remove current digits in the stack that exceed the current digits value \n                while canRemove, let topDigit = stack.last, digit < topDigit  {\n                    stack.removeLast()\n                    removeCount += 1\n                }\n\n                // We can skip inserting zeros if the stack is empty, as they\'d be leading zeros.\n                if stack.isEmpty && digit == "0" { continue }\n\n                // assuming we ran out of removes, append all remaining digits, though this will only run if we run out of removes BEFORE finish iterating over all digits.\n                stack.append(digit)\n            }\n            \n            // If we have not used all of our "removes" yet, we should do that\n            // As we know the top of the stack has the largest digit, we just need to pop the top element until we reach our max pop count\n            while canRemove {\n                stack.removeLast()\n                removeCount += 1\n            }\n            \n            // the stack could be empty, if so, return zero\n            return stack.isEmpty ? "0" : stack\n        }\n}\n```
['Swift', 'Monotonic Stack']