Skip to content

Commit 7499d8d

Browse files
Create README - LeetHub
1 parent c704b72 commit 7499d8d

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed
+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<h2>300. Longest Increasing Subsequence</h2><h3>Medium</h3><hr><div><p>Given an integer array <code>nums</code>, return the length of the longest strictly increasing subsequence.</p>
2+
3+
<p>A <strong>subsequence</strong> is a sequence that can be derived from an array by deleting some or no elements without changing the order of the remaining elements. For example, <code>[3,6,2,7]</code> is a subsequence of the array <code>[0,3,1,6,2,2,7]</code>.</p>
4+
5+
<p>&nbsp;</p>
6+
<p><strong>Example 1:</strong></p>
7+
8+
<pre><strong>Input:</strong> nums = [10,9,2,5,3,7,101,18]
9+
<strong>Output:</strong> 4
10+
<strong>Explanation:</strong> The longest increasing subsequence is [2,3,7,101], therefore the length is 4.
11+
</pre>
12+
13+
<p><strong>Example 2:</strong></p>
14+
15+
<pre><strong>Input:</strong> nums = [0,1,0,3,2,3]
16+
<strong>Output:</strong> 4
17+
</pre>
18+
19+
<p><strong>Example 3:</strong></p>
20+
21+
<pre><strong>Input:</strong> nums = [7,7,7,7,7,7,7]
22+
<strong>Output:</strong> 1
23+
</pre>
24+
25+
<p>&nbsp;</p>
26+
<p><strong>Constraints:</strong></p>
27+
28+
<ul>
29+
<li><code>1 &lt;= nums.length &lt;= 2500</code></li>
30+
<li><code>-10<sup>4</sup> &lt;= nums[i] &lt;= 10<sup>4</sup></code></li>
31+
</ul>
32+
33+
<p>&nbsp;</p>
34+
<p><b>Follow up:</b>&nbsp;Can you come up with an algorithm that runs in&nbsp;<code>O(n log(n))</code> time complexity?</p>
35+
</div>

0 commit comments

Comments
 (0)