Grokking Data Structures & Algorithms for Coding Interviews
0% completed
Solution: 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%