Grokking the Coding Interview: Patterns for Coding Questions
Vote

0% completed

​

Problem 2: Largest Unique Number (easy)

.....

.....

.....

Like the course? Get enrolled and start learning!
A

Anonymous

· 2 years ago

def largestUniqueNumber(self, A: List[int]) -> int: counter = Counter(A) max_num = -1 for num, freq in counter.items(): if num > max_num and freq == 1: max_num = num return max_num

Reading Progress

0%


Vote for new content