✅Accepted| | ✅Easy solution || ✅Short & Simple || ✅Best Method
\n# Code\n\nclass Solution {\npublic:\n    string removeKdigits(string num, int k) {\n        stack<char> st;\n        int c=0;\n        if(k==0)\n        retur
\n# Code\n```\nclass Solution {\npublic:\n    string removeKdigits(string num, int k) {\n        stack<char> st;\n        int c=0;\n        if(k==0)\n        return num;\n        if(k>=num.size())\n        return "0";\n        for(int i=0;i<num.size();i++)\n        {\n            while(c<k && !st.empty() && st.top()>num[i])\n            {\n                st.pop();\n                c++;\n            }\n            st.push(num[i]);\n            if(num[i]==\'0\' && st.size()==1)\n            st.pop();\n        }\n        string s="";\n        while(c<k && !st.empty())\n        {\n            c++;\n            st.pop();\n        }\n        while(!st.empty())\n        {\n            s+=st.top();\n            st.pop();\n        }\n        reverse(s.begin(), s.end());\n        if(s.size()==0)\n        return "0";\n        return s;\n    }\n};\n```\nPlease **UPVOTE** if it helps \u2764\uFE0F\uD83D\uDE0A\nThank You and Happy To Help You!!
['C++']