Untitled
unknown
plain_text
4 years ago
459 B
8
Indexable
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++)
}
}
}
};Editor is loading...