Given an integer array nums, return the second largest distinct element in the array.
If no second largest distinct element exists, return -1.
Input: An integer array nums of length n.
Output: An integer — the second largest distinct element, or -1 if it doesn't exist.
Input: [10,5,8,12,3]
Output: 10
Explanation: Sorted descending distinct: [12,10,8,5,3]. Second largest = 10.Input: [1,1,2]
Output: 1
Explanation: Distinct: [1,2]. Largest=2, second=1. Return 1.Input: [5,5,5]
Output: -1
Explanation: Only one distinct value (5). No second largest. Return -1.1 <= nums.length <= 10^5-10^9 <= nums[i] <= 10^9