摘要: #ifndef STRVEC_H_ #define STRVEC_H_ #include <iostream> #include <stdio.h> #include <string> #include <memory> #include <algorithm> #include <initiali 阅读全文
posted @ 2023-03-21 21:17 xiazichengxi 阅读(22) 评论(0) 推荐(0)
摘要: #ifndef STRVEC_H_ #define STRVEC_H_ #include <string> #include <utility> #include <memory> #include <initializer_list> #include <algorithm> class StrV 阅读全文
posted @ 2023-03-21 16:18 xiazichengxi 阅读(35) 评论(0) 推荐(0)
摘要: 请实现一个函数,把字符串 s 中的每个空格替换成"%20" class Solution { public: string replaceSpace(string s) { //快慢指针从头遍历 每遇到一个空格 就让快指针多走两步 int fast = 0; int slow = 0; for (; 阅读全文
posted @ 2023-03-21 14:44 xiazichengxi 阅读(23) 评论(0) 推荐(0)