剑指offer05-替换空格 知识点:字符串不可变 时间复杂度 O(n) class Solution: def replaceSpace(self, s: str) -> str: res = [] for c in s: if c == ' ': res.append("%20") else: res.append(c) return "".join(res)# 注意这里