1133. Largest Unique Number
class Solution:
def largestUniqueNumber(self, nums: List[int]) -> int:
nums.sort()
table = defaultdict(int)
for num in nums:
table[num] += 1
res = -1
for key, val in table.items():
if val == 1:
res = max(res, key)
return res