Posted on October 14, 2020October 14, 2020 Description Submission class Solution { public: string replaceSpace(string s) { stringstream ss; for(int i = 0; i < s.length(); ++i) { if(s[i] == ' ') { ss << "%20"; } else { ss << s[i]; } } return ss.str(); } }; By Bill0412 LeetCode 剑指Offer