
Given an integer array, return the first index where the current value has already appeared earlier in the array. If no duplicate exists, return -1.
nums = [2, 1, 3, 5, 3, 2]Output4WhyThe value `3` repeats first at index `4`.nums = [1, 2, 3, 4]Output-1WhyAll values are unique.`1 <= len(nums) <= 10^5``-10^9 <= nums[i] <= 10^9`Need the earliest duplicate index, not just any duplicate value