zhuyijun 2 years ago
parent
commit
47820c89dc
3 changed files with 25 additions and 2 deletions
  1. 1 1
      .vscode/settings.json
  2. 3 1
      string/1044.cpp
  3. 21 0
      string/344.cpp

+ 1 - 1
.vscode/settings.json

@@ -88,5 +88,5 @@
         "syncstream": "cpp",
         "queue": "cpp",
         "netfwd": "cpp"
-    }
+    },
 }

+ 3 - 1
string/1044.cpp

@@ -3,7 +3,7 @@
  * @Version: 1.0
  * @Autor: zhuyijun
  * @Date: 2021-12-23 14:37:52
- * @LastEditTime: 2021-12-23 14:37:52
+ * @LastEditTime: 2021-12-28 17:13:01
  */
 /*
 1044. 最长重复子串
@@ -24,6 +24,8 @@
 输出:""
 
 */
+#include <bits/stdc++.h>
+using namespace std;
 class SuffixArray {
  public:
   using size_type = unsigned;

+ 21 - 0
string/344.cpp

@@ -0,0 +1,21 @@
+/*
+ * @Description:
+ * @Version: 1.0
+ * @Autor: zhuyijun
+ * @Date: 2021-12-28 17:12:21
+ * @LastEditTime: 2022-01-21 15:35:19
+ */
+#include <bits/stdc++.h>
+using namespace std;
+void reverseString(vector<char>& s) {
+  if (s.size() < 2) {
+    return;
+  }
+  int l = 0, r = s.size() - 1;
+  while (l < r) {
+    char temp = s[r];
+    s[r] = s[l];
+    s[l] = temp;
+    l++, r--;
+  }
+}