Super easy Solution
Intuition\n Describe your first thoughts on how to solve this problem. Using Stack\n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexi
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->Using Stack\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)$$ -->O(N)\n\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->O(N)\n\n# Code\n```\nclass Solution {\npublic:\n    string removeKdigits(string num, int k) {\n        int n=num.size();\n        stack<char> st;\n        for(int i=0;i<n;i++){\n            while(!st.empty() && k>0 && st.top()>num[i]){\n                st.pop();\n                k--;\n            }\n            if(!st.empty() || num[i]!=\'0\'){\n                st.push(num[i]);\n            }\n        }\n        while(!st.empty() && k>0){\n                st.pop();\n                k--;\n            }\n             if(st.empty()){\n                return "0";\n            }\n            while(!st.empty() ){\n                num[n-1]=st.top();\n                st.pop();\n                n--;\n            }\n            cout<<n;\n            return num.substr(n);\n    }\n};\n```\nUpvote to motivate me to write more solution
['Stack', 'C++', 'Java']