You are viewing a single comment's thread. Return to all comments →
Python 2-liner:
from collections import Counter def beautifulPairs(A, B): result = sum((Counter(A)&Counter(B)).values()) return result+1 if(result<len(B)) else result-1
Seems like cookies are disabled on this browser, please enable them to open this website
Beautiful Pairs
You are viewing a single comment's thread. Return to all comments →
Python 2-liner: