Monostonic Stack Logic Python3
1. Monostonic Stack concept:\n\nclass Solution:\n    def removeKdigits(self, num: str, k: int) -> str:\n        stack = []\n        for n in num:\n            w
# 1. Monostonic Stack concept:\n```\nclass Solution:\n    def removeKdigits(self, num: str, k: int) -> str:\n        stack = []\n        for n in num:\n            while stack and k>0 and stack[-1] > n:\n                stack.pop()\n                k -= 1\n            if stack or n is not \'0\': \n                stack.append(n)       \n        if k:\n            stack=stack[0:-k]     \n        return \'\'.join(stack) or \'0\'\n```
['Monotonic Stack', 'Python3']