Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
459 B
1
Indexable
Never
class Solution {
public:
    string removeKdigits(string num, int k) {
        string ret = "";
        int n = num.size();
        if(k == n) return ret;
        
        stact<int> S;
        for(int i = 0; i < n; i++){
            int now = num[i] - '0';
            while(k and S.top() > now){
                k--, S.po();
            }
            if(k == 0){
                for(; i < n; i++)
            }
        }
        
    }
};