Skip to content

Update solution 020 [README.md] #35

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 20, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions solution/020.Valid Parentheses/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@
### 解法
遍历 string,遇到左括号,压入栈中;遇到右括号,从栈中弹出元素,元素不存在或者元素与该右括号不匹配,返回 false。遍历结束,栈为空则返回 true,否则返回 false。

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

#### java
```
#### Java 版实现
```java
class Solution {
public boolean isValid(String s) {
if (s == null || s == "") {
Expand Down Expand Up @@ -85,8 +85,8 @@ class Solution {
}
```

#### C++
```
#### C++ 版实现
```cpp

class Solution {
public:
Expand Down Expand Up @@ -135,7 +135,7 @@ public:
}
};

//特殊
// 特殊
class Solution {
public:
bool isValid(string s) {
Expand Down Expand Up @@ -165,4 +165,4 @@ public:
}
};

```
```