// Second Largest in Array — EASY
// Category: array
Given an array of integers `nums`, return the second largest distinct value in the array.
If no second largest exists (e.g. all elements are the same, or the array has fewer than 2 elements), return `-1`.
Example: nums = [3, 1, 4, 1, 5, 9, 2, 6]
Output: 6