Skip to content

Commit 6c62e4f

Browse files
committed
Create README - LeetHub
1 parent 9ec83cc commit 6c62e4f

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<h2><a href="https://leetcode.com/problems/valid-mountain-array">978. Valid Mountain Array</a></h2><h3>Easy</h3><hr><p>Given an array of integers <code>arr</code>, return <em><code>true</code> if and only if it is a valid mountain array</em>.</p>
2+
3+
<p>Recall that arr is a mountain array if and only if:</p>
4+
5+
<ul>
6+
<li><code>arr.length &gt;= 3</code></li>
7+
<li>There exists some <code>i</code> with <code>0 &lt; i &lt; arr.length - 1</code> such that:
8+
<ul>
9+
<li><code>arr[0] &lt; arr[1] &lt; ... &lt; arr[i - 1] &lt; arr[i] </code></li>
10+
<li><code>arr[i] &gt; arr[i + 1] &gt; ... &gt; arr[arr.length - 1]</code></li>
11+
</ul>
12+
</li>
13+
</ul>
14+
<img src="https://assets.leetcode.com/uploads/2019/10/20/hint_valid_mountain_array.png" width="500" />
15+
<p>&nbsp;</p>
16+
<p><strong class="example">Example 1:</strong></p>
17+
<pre><strong>Input:</strong> arr = [2,1]
18+
<strong>Output:</strong> false
19+
</pre><p><strong class="example">Example 2:</strong></p>
20+
<pre><strong>Input:</strong> arr = [3,5,5]
21+
<strong>Output:</strong> false
22+
</pre><p><strong class="example">Example 3:</strong></p>
23+
<pre><strong>Input:</strong> arr = [0,3,2,1]
24+
<strong>Output:</strong> true
25+
</pre>
26+
<p>&nbsp;</p>
27+
<p><strong>Constraints:</strong></p>
28+
29+
<ul>
30+
<li><code>1 &lt;= arr.length &lt;= 10<sup>4</sup></code></li>
31+
<li><code>0 &lt;= arr[i] &lt;= 10<sup>4</sup></code></li>
32+
</ul>

0 commit comments

Comments
 (0)