Update 0151.翻转字符串里的单词.md

This commit is contained in:
jianghongcheng 2023-05-06 17:26:56 -05:00 committed by GitHub
parent c75140d257
commit 515c135d61
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -435,7 +435,7 @@ class Solution {
python:
(版本一)先删除空白,然后整个反转,最后单词反转。
### 因为字符串是不可变类型所以反转单词的时候需要将其转换成列表然后通过join函数再将其转换成列表所以空间复杂度不是O(1)
#### 因为字符串是不可变类型所以反转单词的时候需要将其转换成列表然后通过join函数再将其转换成列表所以空间复杂度不是O(1)
```Python
class Solution:
def reverseWords(self, s: str) -> str: