Skip to content

Commit 98e3d24

Browse files
committed
Add solution #20
1 parent 1925117 commit 98e3d24

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

0020-valid-parentheses.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
* https://leetcode.com/problems/valid-parentheses/
44
* Difficulty: Easy
55
*
6-
* Given a string s containing just the characters '(', ')', '{', '}', '[' and ']',
7-
* determine if the input string is valid.
6+
* Given a string s containing just the characters '(', ')', '{', '}',
7+
* '[' and ']', determine if the input string is valid.
88
*
99
* An input string is valid if:
1010
* - Open brackets must be closed by the same type of brackets.
@@ -17,10 +17,10 @@
1717
*/
1818
var isValid = function(s) {
1919
const map = {
20-
'(': ')',
21-
'[': ']',
22-
'{': '}'
23-
}
20+
'(': ')',
21+
'[': ']',
22+
'{': '}',
23+
};
2424
const stack = [];
2525

2626
for (let i = 0; i < s.length; i++) {

0 commit comments

Comments
 (0)