Skip to content

Commit 2cc8a9b

Browse files
Create README - GfG to GitHub
1 parent 61263cc commit 2cc8a9b

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<h2><a href="https://www.geeksforgeeks.org/problems/finding-the-numbers0215/1">Unique Number II</a></h2><h3>Difficulty Level : Difficulty: Medium</h3><hr><div class="problems_problem_content__Xm_eO"><p><span style="font-size: 18px;">Given an array <strong>arr[]</strong> containing <strong>2*n + 2</strong> positive numbers, out of which <strong>2*n numbers exist in pairs</strong> whereas the other two number occur exactly once and are <strong>distinct</strong>. Find the other two numbers. Return the answer in increasing order.</span></p>
2+
<p><span style="font-size: 18px;"><strong>Examples:</strong></span></p>
3+
<pre><span style="font-size: 18px;"><strong>Input: </strong>arr[] = [1, 2, 3, 2, 1, 4]
4+
<strong>Output: </strong>[3, 4]
5+
<strong>Explanation: </strong>3 and 4 occur exactly once.</span>
6+
</pre>
7+
<pre><span style="font-size: 18px;"><strong>Input: </strong>arr[] = [2, 1, 3, 2]
8+
<strong>Output: </strong>[1, 3]
9+
<strong>Explanation: </strong>1 and 3 occur exactly once.<br></span></pre>
10+
<pre><span style="font-size: 14pt;"><strong>Input: </strong>arr[] = [2, 1, 3, 3]
11+
<strong>Output: </strong>[1, 2]
12+
<strong>Explanation: </strong>1 and 2 occur exactly once.</span></pre>
13+
<p><span style="font-size: 18px;"><strong>Constraints:</strong><br><span style="font-size: 14pt;">2 ≤ arr.size() ≤ 10<sup>6&nbsp;</sup></span></span><br><span style="font-size: 14pt;">1 ≤ arr[i] ≤ 5 * 10<sup>6<br><span style="font-size: 14pt;">arr.size() is even</span></sup></span></p></div><p><span style=font-size:18px><strong>Company Tags : </strong><br><code>Accolite</code>&nbsp;<code>Amazon</code>&nbsp;<code>Microsoft</code>&nbsp;<code>Samsung</code>&nbsp;<code>FactSet</code>&nbsp;<code>MakeMyTrip</code>&nbsp;<code>Google</code>&nbsp;<code>Qualcomm</code>&nbsp;<br><p><span style=font-size:18px><strong>Topic Tags : </strong><br><code>Bit Magic</code>&nbsp;<code>Data Structures</code>&nbsp;

0 commit comments

Comments
 (0)