1133. Largest Unique Number

Given an integer array nums, return the largest element that appears exactly once in the array. If no element appears exactly once, return -1.

An element that appears only once means it has no duplicates in the array.

Examples
Input: [1]
Output: 1
Hints
Related Problems

1133. Largest Unique Number

Given an integer array `nums`, return the largest element that appears exactly once in the array. If no element appears exactly once, return `-1`.