Find First Repeating Element Leetcode Problem