1394. Find Lucky Integer in an Array
Содержание
class Solution:
def findLucky(self, arr: List[int]) -> int:
cnt = Counter(arr)
res = -1
for x, v in cnt.items():
if x == v and res < x:
res = x
return res