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

This commit is contained in:
jianghongcheng
2023-05-06 17:26:56 -05:00
committed by GitHub
parent c75140d257
commit 515c135d61

View File

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