You are viewing a single comment's thread. Return to all comments →
Python:
def beautifulPairs(A, B): total = 0 if len(A) == 1: return total for a in A: if a in B: total += 1 B.remove(a) return total + 1 if total < len(A) else len(A) - 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: