algorithms.tutorialhorizon.com
Find the first repeated element in an array by its index | Algorithms
Given an array of integers, find out the first repeated element. First repeated element means the element occurs at least twice and has smallest index.