You are given an integer array nums where the largest integer is unique.
Determine whether the largest element in nums is at least twice as large as every other number in the array. If it is, return the index of the largest element. Otherwise, return
Constraints:
nums.length
nums[i]
The largest element in nums is unique.
You are given an integer array nums where the largest integer is unique.
Determine whether the largest element in nums is at least twice as large as every other number in the array. If it is, return the index of the largest element. Otherwise, return
Constraints:
nums.length
nums[i]
The largest element in nums is unique.