Remove All Adjacent Duplicates-Recursion

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 {
    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";
            return p;
            return rem(p,0);
            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.