Skip to content

Commit 2f530b7

Browse files
committed
Create README - LeetHub
1 parent 5b4f310 commit 2f530b7

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

0020-valid-parentheses/README.md

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
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+
<li>Every close bracket has a corresponding open bracket of the same type.</li>
9+
</ol>
10+
11+
<p>&nbsp;</p>
12+
<p><strong class="example">Example 1:</strong></p>
13+
14+
<pre><strong>Input:</strong> s = "()"
15+
<strong>Output:</strong> true
16+
</pre>
17+
18+
<p><strong class="example">Example 2:</strong></p>
19+
20+
<pre><strong>Input:</strong> s = "()[]{}"
21+
<strong>Output:</strong> true
22+
</pre>
23+
24+
<p><strong class="example">Example 3:</strong></p>
25+
26+
<pre><strong>Input:</strong> s = "(]"
27+
<strong>Output:</strong> false
28+
</pre>
29+
30+
<p>&nbsp;</p>
31+
<p><strong>Constraints:</strong></p>
32+
33+
<ul>
34+
<li><code>1 &lt;= s.length &lt;= 10<sup>4</sup></code></li>
35+
<li><code>s</code> consists of parentheses only <code>'()[]{}'</code>.</li>
36+
</ul>
37+
</div>

0 commit comments

Comments
 (0)