This commit is contained in:
youngyangyang04
2022-02-28 20:52:01 +08:00
parent 266702c291
commit 37e7d73ec2
42 changed files with 64 additions and 60 deletions

View File

@@ -194,7 +194,7 @@ class Solution {
```
Python
```python3
```python
# 方法一,使用栈,推荐!
class Solution:
def removeDuplicates(self, s: str) -> str:
@@ -207,7 +207,7 @@ class Solution:
return "".join(res) # 字符串拼接
```
```python3
```python
# 方法二,使用双指针模拟栈,如果不让用栈可以作为备选方法。
class Solution:
def removeDuplicates(self, s: str) -> str: