Serialize Time : Space : 12345678910string Solution::serialize(vector<string> &A) { string res = ""; for(auto a : A) { res += a; res += to_string(a.length()); res += "~"; } return res;}