We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fe29962 commit 236b85aCopy full SHA for 236b85a
notes/58.1 翻转单词顺序列.md
@@ -16,7 +16,7 @@ Output:
16
17
## 解题思路
18
19
-先旋转每个单词,再旋转整个字符串。
+先翻转每个单词,再翻转整个字符串。
20
21
题目应该有一个隐含条件,就是不能用额外的空间。虽然 Java 的题目输入参数为 String 类型,需要先创建一个字符数组使得空间复杂度为 O(N),但是正确的参数类型应该和原书一样,为字符数组,并且只能使用该字符数组的空间。任何使用了额外空间的解法在面试时都会大打折扣,包括递归解法。
22
notes/58.2 左旋转字符串.md
@@ -6,6 +6,8 @@
6
7
## 题目描述
8
9
+将字符串 S 从第 K 位置分隔成两个子字符串,并交换这两个子字符串的位置。
10
+
11
```html
12
Input:
13
S="abcXYZdef"
0 commit comments