Last active
June 27, 2022 19:10
-
-
Save tjdevries/03b1189c930634dfc3397ccb584188f1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from collections import Counter | |
class Solution: | |
def solve(self, nums): | |
c = Counter(nums) | |
for k, v in c.items(): | |
if k == v: | |
return True | |
return False | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment