Find The Element That Appears Once In Sorted Array

medium
Given a sorted array arr[] of size N. Find the element that appears only once in the array. All other elements appear exactly twice. 

Input Format

Input is managed for you

Output Format

Output is managed for you

Constraints

10^5 <= N <= 10^5

Notice

Try First, Check Solution later

1. You should first read the question and watch the question video.
2. Think of a solution approach, then try and submit the question on editor tab.
3. We strongly advise you to watch the solution video for prescribed approach.

Example

Input
11
1 1 2 2 4 4 7 7 8 10 10
Output
8
Previous
Count Zeros Xor Pairs
Next
First Bad Version

Related Questions