The idea is to traverse through the string from the beginning and remove the first digit which is greater than the digit following it.
If no such digit exists, remove the last digit.
class Solution {
private:
void removeOneDigit(string& s){
for(int i=0; i