highlight:
1.in place: from back to the front
string URLify(string str, int len){
int trueLen = len;
for(int i=0;i<len;i++){
if(str[i]==' '){
trueLen += 2;
}
}
str[trueLen] = '\0';
while(len>0){
trueLen--;
len--;
if(str[len]==' '){
str[trueLen--] = '0';
str[trueLen--] = '2';
str[trueLen] = '%';
}else{
str[trueLen] = str[len];
}
}
return str;
}