Skip to content

Commit 4a7e91a

Browse files
author
tarunkukreja003
committed
Create README - LeetHub
1 parent a86f085 commit 4a7e91a

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed
+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<h2>215. Kth Largest Element in an Array</h2><h3>Medium</h3><hr><div><p>Given an integer array <code>nums</code> and an integer <code>k</code>, return <em>the</em> <code>k<sup>th</sup></code> <em>largest element in the array</em>.</p>
2+
3+
<p>Note that it is the <code>k<sup>th</sup></code> largest element in the sorted order, not the <code>k<sup>th</sup></code> distinct element.</p>
4+
5+
<p>&nbsp;</p>
6+
<p><strong>Example 1:</strong></p>
7+
<pre><strong>Input:</strong> nums = [3,2,1,5,6,4], k = 2
8+
<strong>Output:</strong> 5
9+
</pre><p><strong>Example 2:</strong></p>
10+
<pre><strong>Input:</strong> nums = [3,2,3,1,2,4,5,5,6], k = 4
11+
<strong>Output:</strong> 4
12+
</pre>
13+
<p>&nbsp;</p>
14+
<p><strong>Constraints:</strong></p>
15+
16+
<ul>
17+
<li><code>1 &lt;= k &lt;= nums.length &lt;= 10<sup>4</sup></code></li>
18+
<li><code>-10<sup>4</sup> &lt;= nums[i] &lt;= 10<sup>4</sup></code></li>
19+
</ul>
20+
</div>

0 commit comments

Comments
 (0)