Contest
Codozzle

Write a code to find the first non-repeating element in a given array arr of N integers.  Note: Array consists of only positive and negative integers and not zero. Click here to Upload your answers, Example 1:  Input: arr [] ...Read more

Write a code to find the first non-repeating element in a given array arr of N integers. 

Note: Array consists of only positive and negative integers and not zero.

Click here to Upload your answers,

Example 1

Input: arr [] = {-1, 2, -1, 3, 2} 

Output: 3 

Explanation: -1 and 2 are repeating whereas 3 is the only number occurring once. Hence, the output is 3.  

Example 2: 

Input: arr [] = {1, 1, 1} 

Output: 0

Note : (you can use any languages like JAVA, HTML/CSS/JS, Python, C/C++ or other)

Read less