1. You will be given an Array and its length.
2. You need to find the first repeating element and print its index, use 1 based indices.
4. Input is handled for you
5. It is a functional problem ,please do not modify main()
Input Format
Input is handled for you.
Output Format
Print index of first repeating element
Constraints
1 <= N <= 10^6 0 <= Ai <= 10^6
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
7 6 5 8 5 11 22 8
Output
2