Skip to content

Commit f75c08e

Browse files
committed
Create README - LeetHub
1 parent 74ae56b commit f75c08e

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

20-valid-parentheses/README.md

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<h2><a href="https://leetcode.com/problems/valid-parentheses/">20. Valid Parentheses</a></h2><h3>Easy</h3><hr><div><p>Given a string <code>s</code> containing just the characters <code>'('</code>, <code>')'</code>, <code>'{'</code>, <code>'}'</code>, <code>'['</code> and <code>']'</code>, determine if the input string is valid.</p>
2+
3+
<p>An input string is valid if:</p>
4+
5+
<ol>
6+
<li>Open brackets must be closed by the same type of brackets.</li>
7+
<li>Open brackets must be closed in the correct order.</li>
8+
</ol>
9+
10+
<p>&nbsp;</p>
11+
<p><strong>Example 1:</strong></p>
12+
13+
<pre><strong>Input:</strong> s = "()"
14+
<strong>Output:</strong> true
15+
</pre>
16+
17+
<p><strong>Example 2:</strong></p>
18+
19+
<pre><strong>Input:</strong> s = "()[]{}"
20+
<strong>Output:</strong> true
21+
</pre>
22+
23+
<p><strong>Example 3:</strong></p>
24+
25+
<pre><strong>Input:</strong> s = "(]"
26+
<strong>Output:</strong> false
27+
</pre>
28+
29+
<p>&nbsp;</p>
30+
<p><strong>Constraints:</strong></p>
31+
32+
<ul>
33+
<li><code>1 &lt;= s.length &lt;= 10<sup>4</sup></code></li>
34+
<li><code>s</code> consists of parentheses only <code>'()[]{}'</code>.</li>
35+
</ul>
36+
</div>

0 commit comments

Comments
 (0)