For the following problem Remove Duplicates

I have solved the question using Recursion.

Can anyone Please explain how to calculate time complexity of above solution.

```
class Solution {
public:
string rem(string& p,int i){
cout<<"p is "<<p<<" "<<i<<"\n";
cout<<"string is "<<p<<" size is "<<p.size()<<"\n";
cout<<"i is "<<i<<" "<<p.length()-1<<"\n";
if(i>=(p.length()-1)){
return p;
}
if(p[i]==p[i+1]){
p.erase(i,2);
return rem(p,0);
}else{
return rem(p,i+1);
}
}
string removeDuplicates(string s) {
return rem(s,0);
}
};
```

Also Can anyone explain what is the abnormality of string.length() function.When the string is empty the length of string is shown as 18446744073709551615,whereas the size function is correctly returning the value as 0.