Google interview question

string serialization and deserilization