1133. Largest Unique Number

Updated: 2024-03-12
1 min read
[]

On This Page

LeetCode problem 1133

class Solution:
    def largestUniqueNumber(self, nums: List[int]) -> int:
        cnt = Counter(nums)
        return max((x for x, v in cnt.items() if v == 1), default=-1)