摘要:
也是比较简单的一道题,声明一个ans字符串用来保存替换后的字符串,思路就是遇到不需要替换直接加入ans,遇到需要替换的就将一个“number”加入ans。使用了O(N)的额外空间,时间复制度为O(N)。 #include<bits/stdc++.h> using namespace std; int 阅读全文
posted @ 2025-02-14 20:47
名字好难想zzz
阅读(10)
评论(0)
推荐(0)
摘要:
344没啥好说的 class Solution { public: void reverseString(vector<char>& s) { int len = s.size(); int left = 0; int right = len-1; while (left < len / 2 ) { 阅读全文
posted @ 2025-02-14 19:57
名字好难想zzz
阅读(21)
评论(0)
推荐(0)

浙公网安备 33010602011771号