Close
Topic list
Find The Single Element
EASY
Binary Search
Arrays
Topics (Covered in this problem)
Problem solved
Skill meter
Binary Search
-
-
Arrays
-
-
Other topics
Problem solved
Skill meter
Strings
-
-
Matrices (2D Arrays)
-
-
-
-
Sorting
-
-
Stacks & Queues
-
-
Trees
-
-
Graph
-
-
Dynamic Programming
-
-
Greedy
-
-
Tries
-
-
SQL
-
-
Binary Search Trees
-
-
Heap
-
-
Bit Manipulation
-
-
Solve problems & track your progress
Checkout your overall progress in every topic here
Become
Sensei
in DSA topics
Open the topic and solve more problems associated with it to improve your skills
Check out the skill meter for every topic
See how many problems you are left with to solve for cracking any stage. Score more than zero to get your progress counted.

# Find The Single Element

Contributed by
Shivam Ruhil
Easy
0/40
Share

## Problem Statement

#### For Example:

``````For ‘N’ = 7 and ‘Arr’ = {1, 1, 2, 3, 3, 4, 4}.
1, 3, and 4 occur exactly twice. 2 occurs exactly once.
``````
Detailed explanation ( Input/output format, Notes, Constraints, Images )
##### Sample Input 1:
``````5
1 1 2 2 3
``````
##### Sample Output 1:
``````3
``````
##### Explanation of sample output 1:
``````{1, 2} each occurs twice, whereas, 3 occurs only once.
``````5
``````10