Interview Guides

Given an array of integers nums, return the index of the first element whose value appears exactly once in the array. If no such element exists, return -1. The function should take a list of integers and return a single integer index.
1 <= len(nums) <= 10^5-10^9 <= nums[i] <= 10^9O(n) solution is expected