Skip to content

Commit c87bd13

Browse files
authored
Merge pull request doocs#35 from igayhub/dev
Update solution 020 [README.md]
2 parents d8fdeb6 + 77cb165 commit c87bd13

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

solution/020.Valid Parentheses/README.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@
4242
### 解法
4343
遍历 string,遇到左括号,压入栈中;遇到右括号,从栈中弹出元素,元素不存在或者元素与该右括号不匹配,返回 false。遍历结束,栈为空则返回 true,否则返回 false。
4444

45-
因为字符串只包含"(){}[]",也可以进行特殊处理,用映射来做
45+
因为字符串只包含"(){}[]",也可以进行特殊处理,用映射来做
4646

47-
#### java
48-
```
47+
#### Java 版实现
48+
```java
4949
class Solution {
5050
public boolean isValid(String s) {
5151
if (s == null || s == "") {
@@ -85,8 +85,8 @@ class Solution {
8585
}
8686
```
8787

88-
#### C++
89-
```
88+
#### C++ 版实现
89+
```cpp
9090

9191
class Solution {
9292
public:
@@ -135,7 +135,7 @@ public:
135135
}
136136
};
137137

138-
//特殊
138+
// 特殊
139139
class Solution {
140140
public:
141141
bool isValid(string s) {
@@ -165,4 +165,4 @@ public:
165165
}
166166
};
167167

168-
```
168+
```

0 commit comments

Comments
 (0)