Skip to content

Commit 09a9250

Browse files
committed
Create README - LeetHub
1 parent aee78b2 commit 09a9250

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

0525-contiguous-array/README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<h2><a href="https://leetcode.com/problems/contiguous-array/">525. Contiguous Array</a></h2><h3>Medium</h3><hr><div><p>Given a binary array <code>nums</code>, return <em>the maximum length of a contiguous subarray with an equal number of </em><code>0</code><em> and </em><code>1</code>.</p>
2+
3+
<p>&nbsp;</p>
4+
<p><strong class="example">Example 1:</strong></p>
5+
6+
<pre><strong>Input:</strong> nums = [0,1]
7+
<strong>Output:</strong> 2
8+
<strong>Explanation:</strong> [0, 1] is the longest contiguous subarray with an equal number of 0 and 1.
9+
</pre>
10+
11+
<p><strong class="example">Example 2:</strong></p>
12+
13+
<pre><strong>Input:</strong> nums = [0,1,0]
14+
<strong>Output:</strong> 2
15+
<strong>Explanation:</strong> [0, 1] (or [1, 0]) is a longest contiguous subarray with equal number of 0 and 1.
16+
</pre>
17+
18+
<p>&nbsp;</p>
19+
<p><strong>Constraints:</strong></p>
20+
21+
<ul>
22+
<li><code>1 &lt;= nums.length &lt;= 10<sup>5</sup></code></li>
23+
<li><code>nums[i]</code> is either <code>0</code> or <code>1</code>.</li>
24+
</ul>
25+
</div>

0 commit comments

Comments
 (0)