**Objective:** Given an array of integers, find out the first repeated element. First repeated element means the element occurs atleast twice and has smallest index.

**Input:** An Array

**Output: **The first repeated element

**Examples** :

Array {1,1,3,4,6,7,9} first repeated Number : 1 Array {7,2,2,3,7} first repeated Number : 7 Array {5,3,3,3,3,3,3,3,4,4,4,5,3} first repeated Number : 5

Read moreFind the first repeated element in an array by its index