Skip to content

Commit 87e34b0

Browse files
Create README - LeetHub
1 parent fb5339b commit 87e34b0

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

229-majority-element-ii/README.md

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/majority-element-ii/">229. Majority Element II</a></h2><h3>Medium</h3><hr><div><p>Given an integer array of size <code>n</code>, find all elements that appear more than <code>⌊ n/3 ⌋</code> times.</p>
2+
3+
<p>&nbsp;</p>
4+
<p><strong>Example 1:</strong></p>
5+
6+
<pre><strong>Input:</strong> nums = [3,2,3]
7+
<strong>Output:</strong> [3]
8+
</pre>
9+
10+
<p><strong>Example 2:</strong></p>
11+
12+
<pre><strong>Input:</strong> nums = [1]
13+
<strong>Output:</strong> [1]
14+
</pre>
15+
16+
<p><strong>Example 3:</strong></p>
17+
18+
<pre><strong>Input:</strong> nums = [1,2]
19+
<strong>Output:</strong> [1,2]
20+
</pre>
21+
22+
<p>&nbsp;</p>
23+
<p><strong>Constraints:</strong></p>
24+
25+
<ul>
26+
<li><code>1 &lt;= nums.length &lt;= 5 * 10<sup>4</sup></code></li>
27+
<li><code>-10<sup>9</sup> &lt;= nums[i] &lt;= 10<sup>9</sup></code></li>
28+
</ul>
29+
30+
<p>&nbsp;</p>
31+
<p><strong>Follow up:</strong> Could you solve the problem in linear time and in <code>O(1)</code> space?</p>
32+
</div>

0 commit comments

Comments
 (0)