Python solution Easy to understand 👍
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:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\nO(n)\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\nO(n)\n# Code\n```\nclass Solution:\n    def removeKdigits(self, num: str, k: int) -> str:\n        stk = []\n        remain = len(num) - k\n        for c in num:\n            while k and stk and stk[-1] > c:\n                stk.pop()\n                k -= 1\n            stk.append(c)\n        return \'\'.join(stk[:remain]).lstrip(\'0\') or \'0\'\n```
['Python3']